Merge 5fc4cf7f94
into 634910238d
This commit is contained in:
commit
4edd3f1941
|
@ -307,6 +307,8 @@ optional_component(VISUALISATIONS ON "Visualisations"
|
||||||
DEPENDS "opengl" OPENGL_FOUND
|
DEPENDS "opengl" OPENGL_FOUND
|
||||||
)
|
)
|
||||||
|
|
||||||
|
optional_component(BACKGROUND_STREAMS ON "Background streams")
|
||||||
|
|
||||||
optional_component(TRANSLATIONS ON "Translations"
|
optional_component(TRANSLATIONS ON "Translations"
|
||||||
DEPENDS "gettext" GETTEXT_XGETTEXT_EXECUTABLE
|
DEPENDS "gettext" GETTEXT_XGETTEXT_EXECUTABLE
|
||||||
DEPENDS "Qt5LinguistTools" Qt5LinguistTools_FOUND
|
DEPENDS "Qt5LinguistTools" Qt5LinguistTools_FOUND
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#cmakedefine HAVE_OPENGL
|
#cmakedefine HAVE_OPENGL
|
||||||
#cmakedefine HAVE_TRANSLATIONS
|
#cmakedefine HAVE_TRANSLATIONS
|
||||||
#cmakedefine HAVE_SPOTIFY
|
#cmakedefine HAVE_SPOTIFY
|
||||||
|
#cmakedefine HAVE_BACKGROUND_STREAMS
|
||||||
#cmakedefine TAGLIB_HAS_OPUS
|
#cmakedefine TAGLIB_HAS_OPUS
|
||||||
#cmakedefine USE_INSTALL_PREFIX
|
#cmakedefine USE_INSTALL_PREFIX
|
||||||
#cmakedefine USE_SYSTEM_PROJECTM
|
#cmakedefine USE_SYSTEM_PROJECTM
|
||||||
|
|
|
@ -67,7 +67,6 @@ set(SOURCES
|
||||||
|
|
||||||
core/appearance.cpp
|
core/appearance.cpp
|
||||||
core/application.cpp
|
core/application.cpp
|
||||||
core/backgroundstreams.cpp
|
|
||||||
core/commandlineoptions.cpp
|
core/commandlineoptions.cpp
|
||||||
core/crashreporting.cpp
|
core/crashreporting.cpp
|
||||||
core/database.cpp
|
core/database.cpp
|
||||||
|
@ -340,7 +339,6 @@ set(SOURCES
|
||||||
ui/albumcovermanagerlist.cpp
|
ui/albumcovermanagerlist.cpp
|
||||||
ui/albumcoversearcher.cpp
|
ui/albumcoversearcher.cpp
|
||||||
ui/appearancesettingspage.cpp
|
ui/appearancesettingspage.cpp
|
||||||
ui/backgroundstreamssettingspage.cpp
|
|
||||||
ui/behavioursettingspage.cpp
|
ui/behavioursettingspage.cpp
|
||||||
ui/console.cpp
|
ui/console.cpp
|
||||||
ui/coverfromurldialog.cpp
|
ui/coverfromurldialog.cpp
|
||||||
|
@ -386,7 +384,6 @@ set(SOURCES
|
||||||
widgets/fileviewlist.cpp
|
widgets/fileviewlist.cpp
|
||||||
widgets/forcescrollperpixel.cpp
|
widgets/forcescrollperpixel.cpp
|
||||||
widgets/freespacebar.cpp
|
widgets/freespacebar.cpp
|
||||||
widgets/fullscreenhypnotoad.cpp
|
|
||||||
widgets/groupediconview.cpp
|
widgets/groupediconview.cpp
|
||||||
widgets/lineedit.cpp
|
widgets/lineedit.cpp
|
||||||
widgets/linetextedit.cpp
|
widgets/linetextedit.cpp
|
||||||
|
@ -421,7 +418,6 @@ set(HEADERS
|
||||||
analyzers/turbine.h
|
analyzers/turbine.h
|
||||||
|
|
||||||
core/application.h
|
core/application.h
|
||||||
core/backgroundstreams.h
|
|
||||||
core/crashreporting.h
|
core/crashreporting.h
|
||||||
core/database.h
|
core/database.h
|
||||||
core/deletefiles.h
|
core/deletefiles.h
|
||||||
|
@ -643,7 +639,6 @@ set(HEADERS
|
||||||
ui/albumcovermanagerlist.h
|
ui/albumcovermanagerlist.h
|
||||||
ui/albumcoversearcher.h
|
ui/albumcoversearcher.h
|
||||||
ui/appearancesettingspage.h
|
ui/appearancesettingspage.h
|
||||||
ui/backgroundstreamssettingspage.h
|
|
||||||
ui/behavioursettingspage.h
|
ui/behavioursettingspage.h
|
||||||
ui/console.h
|
ui/console.h
|
||||||
ui/coverfromurldialog.h
|
ui/coverfromurldialog.h
|
||||||
|
@ -782,7 +777,6 @@ set(UI
|
||||||
ui/albumcovermanager.ui
|
ui/albumcovermanager.ui
|
||||||
ui/albumcoversearcher.ui
|
ui/albumcoversearcher.ui
|
||||||
ui/appearancesettingspage.ui
|
ui/appearancesettingspage.ui
|
||||||
ui/backgroundstreamssettingspage.ui
|
|
||||||
ui/behavioursettingspage.ui
|
ui/behavioursettingspage.ui
|
||||||
ui/console.ui
|
ui/console.ui
|
||||||
ui/coverfromurldialog.ui
|
ui/coverfromurldialog.ui
|
||||||
|
@ -842,6 +836,20 @@ endif(HAVE_TRANSLATIONS)
|
||||||
|
|
||||||
option(USE_INSTALL_PREFIX "Look for data in CMAKE_INSTALL_PREFIX" ON)
|
option(USE_INSTALL_PREFIX "Look for data in CMAKE_INSTALL_PREFIX" ON)
|
||||||
|
|
||||||
|
# Background streams
|
||||||
|
optional_source(HAVE_BACKGROUND_STREAMS
|
||||||
|
SOURCES
|
||||||
|
core/backgroundstreams.cpp
|
||||||
|
ui/backgroundstreamssettingspage.cpp
|
||||||
|
widgets/fullscreenhypnotoad.cpp
|
||||||
|
HEADERS
|
||||||
|
core/backgroundstreams.h
|
||||||
|
ui/backgroundstreamssettingspage.h
|
||||||
|
widgets/fullscreenhypnotoad.h
|
||||||
|
UI
|
||||||
|
ui/backgroundstreamssettingspage.ui
|
||||||
|
)
|
||||||
|
|
||||||
# Visualisations
|
# Visualisations
|
||||||
optional_source(HAVE_VISUALISATIONS
|
optional_source(HAVE_VISUALISATIONS
|
||||||
SOURCES
|
SOURCES
|
||||||
|
|
|
@ -90,6 +90,8 @@ const char* GstEngine::kAutoSink = "autoaudiosink";
|
||||||
const char* GstEngine::kOutFormatDetect = "";
|
const char* GstEngine::kOutFormatDetect = "";
|
||||||
const char* GstEngine::kOutFormatS16LE = "S16LE";
|
const char* GstEngine::kOutFormatS16LE = "S16LE";
|
||||||
const char* GstEngine::kOutFormatF32LE = "F32LE";
|
const char* GstEngine::kOutFormatF32LE = "F32LE";
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
const char* GstEngine::kHypnotoadPipeline =
|
const char* GstEngine::kHypnotoadPipeline =
|
||||||
"audiotestsrc wave=6 ! "
|
"audiotestsrc wave=6 ! "
|
||||||
"audioecho intensity=1 delay=50000000 ! "
|
"audioecho intensity=1 delay=50000000 ! "
|
||||||
|
@ -100,6 +102,7 @@ const char* GstEngine::kHypnotoadPipeline =
|
||||||
const char* GstEngine::kEnterprisePipeline =
|
const char* GstEngine::kEnterprisePipeline =
|
||||||
"audiotestsrc wave=5 ! "
|
"audiotestsrc wave=5 ! "
|
||||||
"audiocheblimit mode=0 cutoff=120";
|
"audiocheblimit mode=0 cutoff=120";
|
||||||
|
#endif // HAVE_BACKGROUND_STREAMS
|
||||||
|
|
||||||
GstEngine::GstEngine(Application* app)
|
GstEngine::GstEngine(Application* app)
|
||||||
: Engine::Base(),
|
: Engine::Base(),
|
||||||
|
@ -850,19 +853,25 @@ shared_ptr<GstEnginePipeline> GstEngine::CreatePipeline(
|
||||||
const MediaPlaybackRequest& req, qint64 end_nanosec) {
|
const MediaPlaybackRequest& req, qint64 end_nanosec) {
|
||||||
shared_ptr<GstEnginePipeline> ret = CreatePipeline();
|
shared_ptr<GstEnginePipeline> ret = CreatePipeline();
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
if (req.url_.scheme() == "hypnotoad") {
|
if (req.url_.scheme() == "hypnotoad") {
|
||||||
if (!ret->InitFromString(kHypnotoadPipeline)) {
|
if (!ret->InitFromString(kHypnotoadPipeline)) {
|
||||||
qLog(Error) << "Could not initialize pipeline" << kHypnotoadPipeline;
|
qLog(Error) << "Could not initialize pipeline" << kHypnotoadPipeline;
|
||||||
ret.reset();
|
ret.reset();
|
||||||
}
|
}
|
||||||
} else if (req.url_.scheme() == "enterprise") {
|
return ret;
|
||||||
|
}
|
||||||
|
if (req.url_.scheme() == "enterprise") {
|
||||||
if (!ret->InitFromString(kEnterprisePipeline)) {
|
if (!ret->InitFromString(kEnterprisePipeline)) {
|
||||||
qLog(Error) << "Could not initialize pipeline" << kEnterprisePipeline;
|
qLog(Error) << "Could not initialize pipeline" << kEnterprisePipeline;
|
||||||
ret.reset();
|
ret.reset();
|
||||||
}
|
}
|
||||||
} else {
|
return ret;
|
||||||
if (!ret->InitFromReq(req, end_nanosec)) ret.reset();
|
|
||||||
}
|
}
|
||||||
|
#endif // HAVE_BACKGROUND_STREAMS
|
||||||
|
|
||||||
|
if (!ret->InitFromReq(req, end_nanosec))
|
||||||
|
ret.reset();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -877,6 +886,8 @@ void GstEngine::RemoveBufferConsumer(BufferConsumer* consumer) {
|
||||||
if (current_pipeline_) current_pipeline_->RemoveBufferConsumer(consumer);
|
if (current_pipeline_) current_pipeline_->RemoveBufferConsumer(consumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
|
|
||||||
int GstEngine::AddBackgroundStream(shared_ptr<GstEnginePipeline> pipeline) {
|
int GstEngine::AddBackgroundStream(shared_ptr<GstEnginePipeline> pipeline) {
|
||||||
// We don't want to get metadata messages or end notifications.
|
// We don't want to get metadata messages or end notifications.
|
||||||
disconnect(pipeline.get(),
|
disconnect(pipeline.get(),
|
||||||
|
@ -930,6 +941,8 @@ void GstEngine::SetBackgroundStreamVolume(int id, int volume) {
|
||||||
pipeline->SetVolume(volume);
|
pipeline->SetVolume(volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // HAVE_BACKGROUND_STREAMS
|
||||||
|
|
||||||
void GstEngine::BufferingStarted() {
|
void GstEngine::BufferingStarted() {
|
||||||
if (buffering_task_id_ != -1) {
|
if (buffering_task_id_ != -1) {
|
||||||
task_manager_->SetTaskFinished(buffering_task_id_);
|
task_manager_->SetTaskFinished(buffering_task_id_);
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <QTimerEvent>
|
#include <QTimerEvent>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
#include "bufferconsumer.h"
|
#include "bufferconsumer.h"
|
||||||
#include "core/timeconstants.h"
|
#include "core/timeconstants.h"
|
||||||
#include "enginebase.h"
|
#include "enginebase.h"
|
||||||
|
@ -84,9 +85,11 @@ class GstEngine : public Engine::Base, public BufferConsumer {
|
||||||
void EnsureInitialised() { initialising_.waitForFinished(); }
|
void EnsureInitialised() { initialising_.waitForFinished(); }
|
||||||
void InitialiseGstreamer();
|
void InitialiseGstreamer();
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
int AddBackgroundStream(const QUrl& url);
|
int AddBackgroundStream(const QUrl& url);
|
||||||
void StopBackgroundStream(int id);
|
void StopBackgroundStream(int id);
|
||||||
void SetBackgroundStreamVolume(int id, int volume);
|
void SetBackgroundStreamVolume(int id, int volume);
|
||||||
|
#endif
|
||||||
|
|
||||||
qint64 position_nanosec() const;
|
qint64 position_nanosec() const;
|
||||||
qint64 length_nanosec() const;
|
qint64 length_nanosec() const;
|
||||||
|
@ -152,8 +155,10 @@ class GstEngine : public Engine::Base, public BufferConsumer {
|
||||||
void FadeoutFinished();
|
void FadeoutFinished();
|
||||||
void FadeoutPauseFinished();
|
void FadeoutPauseFinished();
|
||||||
void SeekNow();
|
void SeekNow();
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
void BackgroundStreamFinished();
|
void BackgroundStreamFinished();
|
||||||
void BackgroundStreamPlayDone(QFuture<GstStateChangeReturn>, int);
|
void BackgroundStreamPlayDone(QFuture<GstStateChangeReturn>, int);
|
||||||
|
#endif
|
||||||
void PlayDone(QFuture<GstStateChangeReturn> future, const quint64, const int);
|
void PlayDone(QFuture<GstStateChangeReturn> future, const quint64, const int);
|
||||||
|
|
||||||
void BufferingStarted();
|
void BufferingStarted();
|
||||||
|
@ -182,7 +187,9 @@ class GstEngine : public Engine::Base, public BufferConsumer {
|
||||||
|
|
||||||
void UpdateScope(int chunk_length);
|
void UpdateScope(int chunk_length);
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
int AddBackgroundStream(std::shared_ptr<GstEnginePipeline> pipeline);
|
int AddBackgroundStream(std::shared_ptr<GstEnginePipeline> pipeline);
|
||||||
|
#endif
|
||||||
|
|
||||||
bool IsCurrentPipeline(int id);
|
bool IsCurrentPipeline(int id);
|
||||||
|
|
||||||
|
@ -240,7 +247,9 @@ class GstEngine : public Engine::Base, public BufferConsumer {
|
||||||
int timer_id_;
|
int timer_id_;
|
||||||
int next_element_id_;
|
int next_element_id_;
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
QHash<int, std::shared_ptr<GstEnginePipeline>> background_streams_;
|
QHash<int, std::shared_ptr<GstEnginePipeline>> background_streams_;
|
||||||
|
#endif
|
||||||
|
|
||||||
bool is_fading_out_to_pause_;
|
bool is_fading_out_to_pause_;
|
||||||
bool has_faded_out_;
|
bool has_faded_out_;
|
||||||
|
|
|
@ -27,19 +27,24 @@
|
||||||
|
|
||||||
BackgroundStreamsSettingsPage::BackgroundStreamsSettingsPage(
|
BackgroundStreamsSettingsPage::BackgroundStreamsSettingsPage(
|
||||||
SettingsDialog* dialog)
|
SettingsDialog* dialog)
|
||||||
: SettingsPage(dialog), ui_(new Ui_BackgroundStreamsSettingsPage) {
|
: SettingsPage(dialog),
|
||||||
|
ui_(new Ui_BackgroundStreamsSettingsPage),
|
||||||
|
loaded_(false) {
|
||||||
ui_->setupUi(this);
|
ui_->setupUi(this);
|
||||||
setWindowIcon(
|
setWindowIcon(
|
||||||
IconLoader::Load("weather-showers-scattered", IconLoader::Base));
|
IconLoader::Load("weather-showers-scattered", IconLoader::Base));
|
||||||
|
|
||||||
for (const QString& name : dialog->background_streams()->streams()) {
|
|
||||||
AddStream(name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BackgroundStreamsSettingsPage::~BackgroundStreamsSettingsPage() { delete ui_; }
|
BackgroundStreamsSettingsPage::~BackgroundStreamsSettingsPage() { delete ui_; }
|
||||||
|
|
||||||
void BackgroundStreamsSettingsPage::Load() {}
|
void BackgroundStreamsSettingsPage::Load() {
|
||||||
|
if (!loaded_ and dialog()->background_streams()) {
|
||||||
|
for (const QString& name : dialog()->background_streams()->streams()) {
|
||||||
|
AddStream(name);
|
||||||
|
}
|
||||||
|
loaded_ = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void BackgroundStreamsSettingsPage::Save() {
|
void BackgroundStreamsSettingsPage::Save() {
|
||||||
dialog()->background_streams()->SaveStreams();
|
dialog()->background_streams()->SaveStreams();
|
||||||
|
|
|
@ -41,6 +41,7 @@ class BackgroundStreamsSettingsPage : public SettingsPage {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_BackgroundStreamsSettingsPage* ui_;
|
Ui_BackgroundStreamsSettingsPage* ui_;
|
||||||
|
bool loaded_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BACKGROUNDSTREAMSSETTINGSPAGE_H
|
#endif // BACKGROUNDSTREAMSSETTINGSPAGE_H
|
||||||
|
|
|
@ -39,7 +39,9 @@
|
||||||
|
|
||||||
#include "core/appearance.h"
|
#include "core/appearance.h"
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
#include "core/backgroundstreams.h"
|
#include "core/backgroundstreams.h"
|
||||||
|
#endif
|
||||||
#include "core/commandlineoptions.h"
|
#include "core/commandlineoptions.h"
|
||||||
#include "core/database.h"
|
#include "core/database.h"
|
||||||
#include "core/deletefiles.h"
|
#include "core/deletefiles.h"
|
||||||
|
@ -310,8 +312,10 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||||
// Start initialising the player
|
// Start initialising the player
|
||||||
qLog(Debug) << "Initialising player";
|
qLog(Debug) << "Initialising player";
|
||||||
app_->player()->Init();
|
app_->player()->Init();
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
background_streams_ = new BackgroundStreams(app_->player()->engine(), this);
|
background_streams_ = new BackgroundStreams(app_->player()->engine(), this);
|
||||||
background_streams_->LoadStreams();
|
background_streams_->LoadStreams();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Models
|
// Models
|
||||||
qLog(Debug) << "Creating models";
|
qLog(Debug) << "Creating models";
|
||||||
|
@ -392,13 +396,7 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||||
IconLoader::Load("document-save", IconLoader::Base));
|
IconLoader::Load("document-save", IconLoader::Base));
|
||||||
ui_->action_full_library_scan->setIcon(
|
ui_->action_full_library_scan->setIcon(
|
||||||
IconLoader::Load("view-refresh", IconLoader::Base));
|
IconLoader::Load("view-refresh", IconLoader::Base));
|
||||||
ui_->action_rain->setIcon(
|
|
||||||
IconLoader::Load("weather-showers-scattered", IconLoader::Base));
|
|
||||||
ui_->action_hypnotoad->setIcon(
|
|
||||||
IconLoader::Load("hypnotoad", IconLoader::Base));
|
|
||||||
ui_->action_kittens->setIcon(IconLoader::Load("kittens", IconLoader::Base));
|
ui_->action_kittens->setIcon(IconLoader::Load("kittens", IconLoader::Base));
|
||||||
ui_->action_enterprise->setIcon(
|
|
||||||
IconLoader::Load("enterprise", IconLoader::Base));
|
|
||||||
ui_->action_love->setIcon(IconLoader::Load("love", IconLoader::Lastfm));
|
ui_->action_love->setIcon(IconLoader::Load("love", IconLoader::Lastfm));
|
||||||
|
|
||||||
// File view connections
|
// File view connections
|
||||||
|
@ -495,9 +493,29 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||||
connect(this, SIGNAL(NewDebugConsole(Console*)), app_,
|
connect(this, SIGNAL(NewDebugConsole(Console*)), app_,
|
||||||
SIGNAL(NewDebugConsole(Console*)));
|
SIGNAL(NewDebugConsole(Console*)));
|
||||||
|
|
||||||
background_streams_->AddAction("Rain", ui_->action_rain);
|
// Add menus for background streams
|
||||||
background_streams_->AddAction("Hypnotoad", ui_->action_hypnotoad);
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
background_streams_->AddAction("Make it so!", ui_->action_enterprise);
|
QAction* action_rain =
|
||||||
|
ui_->menu_extras->addAction(tr("Rain"));
|
||||||
|
action_rain->setIcon(
|
||||||
|
IconLoader::Load("weather-showers-scattered", IconLoader::Base));
|
||||||
|
action_rain->setCheckable(true);
|
||||||
|
background_streams_->AddAction("Rain", action_rain);
|
||||||
|
|
||||||
|
QAction* action_hypnotoad =
|
||||||
|
ui_->menu_extras->addAction(tr("All Glory to the Hypnotoad!"));
|
||||||
|
action_hypnotoad->setIcon(
|
||||||
|
IconLoader::Load("hypnotoad", IconLoader::Base));
|
||||||
|
action_hypnotoad->setCheckable(true);
|
||||||
|
background_streams_->AddAction("Hypnotoad", action_hypnotoad);
|
||||||
|
|
||||||
|
QAction* action_enterprise =
|
||||||
|
ui_->menu_extras->addAction(tr("Make it so!"));
|
||||||
|
action_enterprise->setIcon(
|
||||||
|
IconLoader::Load("enterprise", IconLoader::Base));
|
||||||
|
action_enterprise->setCheckable(true);
|
||||||
|
background_streams_->AddAction("Make it so!", action_enterprise);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Playlist view actions
|
// Playlist view actions
|
||||||
ui_->action_next_playlist->setShortcuts(
|
ui_->action_next_playlist->setShortcuts(
|
||||||
|
@ -938,8 +956,10 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||||
connect(app_->player(), SIGNAL(Stopped()), ui_->now_playing, SLOT(Stopped()));
|
connect(app_->player(), SIGNAL(Stopped()), ui_->now_playing, SLOT(Stopped()));
|
||||||
connect(ui_->now_playing, SIGNAL(ShowAboveStatusBarChanged(bool)),
|
connect(ui_->now_playing, SIGNAL(ShowAboveStatusBarChanged(bool)),
|
||||||
SLOT(NowPlayingWidgetPositionChanged(bool)));
|
SLOT(NowPlayingWidgetPositionChanged(bool)));
|
||||||
connect(ui_->action_hypnotoad, SIGNAL(toggled(bool)), ui_->now_playing,
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
|
connect(action_hypnotoad, SIGNAL(toggled(bool)), ui_->now_playing,
|
||||||
SLOT(AllHail(bool)));
|
SLOT(AllHail(bool)));
|
||||||
|
#endif
|
||||||
connect(ui_->action_kittens, SIGNAL(toggled(bool)), ui_->now_playing,
|
connect(ui_->action_kittens, SIGNAL(toggled(bool)), ui_->now_playing,
|
||||||
SLOT(EnableKittens(bool)));
|
SLOT(EnableKittens(bool)));
|
||||||
connect(ui_->action_kittens, SIGNAL(toggled(bool)), app_->network_remote(),
|
connect(ui_->action_kittens, SIGNAL(toggled(bool)), app_->network_remote(),
|
||||||
|
@ -2718,10 +2738,12 @@ void MainWindow::ChangeLibraryQueryMode(QAction* action) {
|
||||||
void MainWindow::ShowCoverManager() { cover_manager_->show(); }
|
void MainWindow::ShowCoverManager() { cover_manager_->show(); }
|
||||||
|
|
||||||
SettingsDialog* MainWindow::CreateSettingsDialog() {
|
SettingsDialog* MainWindow::CreateSettingsDialog() {
|
||||||
SettingsDialog* settings_dialog =
|
SettingsDialog* settings_dialog = new SettingsDialog(app_);
|
||||||
new SettingsDialog(app_, background_streams_);
|
|
||||||
settings_dialog->SetGlobalShortcutManager(global_shortcuts_);
|
settings_dialog->SetGlobalShortcutManager(global_shortcuts_);
|
||||||
settings_dialog->SetSongInfoView(song_info_view_);
|
settings_dialog->SetSongInfoView(song_info_view_);
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
|
settings_dialog->SetBackgroundStreams(background_streams_);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
connect(settings_dialog, SIGNAL(accepted()), SLOT(ReloadAllSettings()));
|
connect(settings_dialog, SIGNAL(accepted()), SLOT(ReloadAllSettings()));
|
||||||
|
|
|
@ -541,9 +541,6 @@
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&Extras</string>
|
<string>&Extras</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="action_rain"/>
|
|
||||||
<addaction name="action_hypnotoad"/>
|
|
||||||
<addaction name="action_enterprise"/>
|
|
||||||
<addaction name="action_kittens"/>
|
<addaction name="action_kittens"/>
|
||||||
<addaction name="action_console"/>
|
<addaction name="action_console"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
|
@ -735,30 +732,6 @@
|
||||||
<string>Cover Manager</string>
|
<string>Cover Manager</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="action_rain">
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Label for button to enable/disable rain background sound.">Rain</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_hypnotoad">
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Label for button to enable/disable Hypnotoad background sound.">All Glory to the Hypnotoad!</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_enterprise">
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="Label for button to enable/disable Enterprise background sound.">Make it so!</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_kittens">
|
<action name="action_kittens">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|
|
@ -18,11 +18,13 @@
|
||||||
#include "settingsdialog.h"
|
#include "settingsdialog.h"
|
||||||
|
|
||||||
#include "appearancesettingspage.h"
|
#include "appearancesettingspage.h"
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
#include "backgroundstreamssettingspage.h"
|
#include "backgroundstreamssettingspage.h"
|
||||||
|
#include "core/backgroundstreams.h"
|
||||||
|
#endif
|
||||||
#include "behavioursettingspage.h"
|
#include "behavioursettingspage.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
#include "core/backgroundstreams.h"
|
|
||||||
#include "core/logging.h"
|
#include "core/logging.h"
|
||||||
#include "core/networkproxyfactory.h"
|
#include "core/networkproxyfactory.h"
|
||||||
#include "core/player.h"
|
#include "core/player.h"
|
||||||
|
@ -89,14 +91,13 @@ void SettingsItemDelegate::paint(QPainter* painter,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsDialog::SettingsDialog(Application* app, BackgroundStreams* streams,
|
SettingsDialog::SettingsDialog(Application* app, QWidget* parent)
|
||||||
QWidget* parent)
|
|
||||||
: QDialog(parent),
|
: QDialog(parent),
|
||||||
app_(app),
|
app_(app),
|
||||||
model_(app_->directory_model()),
|
model_(app_->directory_model()),
|
||||||
gst_engine_(qobject_cast<GstEngine*>(app_->player()->engine())),
|
gst_engine_(qobject_cast<GstEngine*>(app_->player()->engine())),
|
||||||
song_info_view_(nullptr),
|
song_info_view_(nullptr),
|
||||||
streams_(streams),
|
background_streams_(nullptr),
|
||||||
global_search_(app_->global_search()),
|
global_search_(app_->global_search()),
|
||||||
appearance_(app_->appearance()),
|
appearance_(app_->appearance()),
|
||||||
ui_(new Ui_SettingsDialog),
|
ui_(new Ui_SettingsDialog),
|
||||||
|
@ -110,8 +111,10 @@ SettingsDialog::SettingsDialog(Application* app, BackgroundStreams* streams,
|
||||||
general->AddPage(Page_Behaviour, new BehaviourSettingsPage(this));
|
general->AddPage(Page_Behaviour, new BehaviourSettingsPage(this));
|
||||||
general->AddPage(Page_Library, new LibrarySettingsPage(this));
|
general->AddPage(Page_Library, new LibrarySettingsPage(this));
|
||||||
general->AddPage(Page_SongMetadata, new SongMetadataSettingsPage(this));
|
general->AddPage(Page_SongMetadata, new SongMetadataSettingsPage(this));
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
general->AddPage(Page_BackgroundStreams,
|
general->AddPage(Page_BackgroundStreams,
|
||||||
new BackgroundStreamsSettingsPage(this));
|
new BackgroundStreamsSettingsPage(this));
|
||||||
|
#endif
|
||||||
general->AddPage(Page_Proxy, new NetworkProxySettingsPage(this));
|
general->AddPage(Page_Proxy, new NetworkProxySettingsPage(this));
|
||||||
general->AddPage(Page_Transcoding, new TranscoderSettingsPage(this));
|
general->AddPage(Page_Transcoding, new TranscoderSettingsPage(this));
|
||||||
general->AddPage(Page_NetworkRemote, new NetworkRemoteSettingsPage(this));
|
general->AddPage(Page_NetworkRemote, new NetworkRemoteSettingsPage(this));
|
||||||
|
|
|
@ -55,8 +55,7 @@ class SettingsDialog : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SettingsDialog(Application* app, BackgroundStreams* streams,
|
SettingsDialog(Application* app, QWidget* parent = nullptr);
|
||||||
QWidget* parent = nullptr);
|
|
||||||
~SettingsDialog();
|
~SettingsDialog();
|
||||||
|
|
||||||
enum Page {
|
enum Page {
|
||||||
|
@ -101,6 +100,7 @@ class SettingsDialog : public QDialog {
|
||||||
manager_ = manager;
|
manager_ = manager;
|
||||||
}
|
}
|
||||||
void SetSongInfoView(SongInfoView* view) { song_info_view_ = view; }
|
void SetSongInfoView(SongInfoView* view) { song_info_view_ = view; }
|
||||||
|
void SetBackgroundStreams(BackgroundStreams* streams) { background_streams_ = streams; }
|
||||||
|
|
||||||
bool is_loading_settings() const { return loading_settings_; }
|
bool is_loading_settings() const { return loading_settings_; }
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class SettingsDialog : public QDialog {
|
||||||
GlobalShortcuts* global_shortcuts_manager() const { return manager_; }
|
GlobalShortcuts* global_shortcuts_manager() const { return manager_; }
|
||||||
const GstEngine* gst_engine() const { return gst_engine_; }
|
const GstEngine* gst_engine() const { return gst_engine_; }
|
||||||
SongInfoView* song_info_view() const { return song_info_view_; }
|
SongInfoView* song_info_view() const { return song_info_view_; }
|
||||||
BackgroundStreams* background_streams() const { return streams_; }
|
BackgroundStreams* background_streams() const { return background_streams_; }
|
||||||
GlobalSearch* global_search() const { return global_search_; }
|
GlobalSearch* global_search() const { return global_search_; }
|
||||||
Appearance* appearance() const { return appearance_; }
|
Appearance* appearance() const { return appearance_; }
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ class SettingsDialog : public QDialog {
|
||||||
GlobalShortcuts* manager_;
|
GlobalShortcuts* manager_;
|
||||||
const GstEngine* gst_engine_;
|
const GstEngine* gst_engine_;
|
||||||
SongInfoView* song_info_view_;
|
SongInfoView* song_info_view_;
|
||||||
BackgroundStreams* streams_;
|
BackgroundStreams* background_streams_;
|
||||||
GlobalSearch* global_search_;
|
GlobalSearch* global_search_;
|
||||||
Appearance* appearance_;
|
Appearance* appearance_;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,9 @@
|
||||||
#include "covers/coverproviders.h"
|
#include "covers/coverproviders.h"
|
||||||
#include "covers/currentartloader.h"
|
#include "covers/currentartloader.h"
|
||||||
#include "covers/kittenloader.h"
|
#include "covers/kittenloader.h"
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
#include "fullscreenhypnotoad.h"
|
#include "fullscreenhypnotoad.h"
|
||||||
|
#endif
|
||||||
#include "library/librarybackend.h"
|
#include "library/librarybackend.h"
|
||||||
#include "networkremote/networkremote.h"
|
#include "networkremote/networkremote.h"
|
||||||
#include "ui/albumcoverchoicecontroller.h"
|
#include "ui/albumcoverchoicecontroller.h"
|
||||||
|
@ -43,7 +45,9 @@
|
||||||
|
|
||||||
const char* NowPlayingWidget::kSettingsGroup = "NowPlayingWidget";
|
const char* NowPlayingWidget::kSettingsGroup = "NowPlayingWidget";
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
const char* NowPlayingWidget::kHypnotoadPath = ":/hypnotoad.gif";
|
const char* NowPlayingWidget::kHypnotoadPath = ":/hypnotoad.gif";
|
||||||
|
#endif
|
||||||
|
|
||||||
// Space between the cover and the details in small mode
|
// Space between the cover and the details in small mode
|
||||||
const int NowPlayingWidget::kPadding = 2;
|
const int NowPlayingWidget::kPadding = 2;
|
||||||
|
@ -76,7 +80,9 @@ NowPlayingWidget::NowPlayingWidget(QWidget* parent)
|
||||||
fade_animation_(new QTimeLine(1000, this)),
|
fade_animation_(new QTimeLine(1000, this)),
|
||||||
details_(new QTextDocument(this)),
|
details_(new QTextDocument(this)),
|
||||||
previous_track_opacity_(0.0),
|
previous_track_opacity_(0.0),
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
bask_in_his_glory_action_(nullptr),
|
bask_in_his_glory_action_(nullptr),
|
||||||
|
#endif
|
||||||
downloading_covers_(false),
|
downloading_covers_(false),
|
||||||
aww_(false),
|
aww_(false),
|
||||||
kittens_(nullptr),
|
kittens_(nullptr),
|
||||||
|
@ -142,10 +148,12 @@ NowPlayingWidget::NowPlayingWidget(QWidget* parent)
|
||||||
above_statusbar_action_->setChecked(
|
above_statusbar_action_->setChecked(
|
||||||
s.value("above_status_bar", false).toBool());
|
s.value("above_status_bar", false).toBool());
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
bask_in_his_glory_action_ =
|
bask_in_his_glory_action_ =
|
||||||
menu_->addAction(tr("ALL GLORY TO THE HYPNOTOAD"));
|
menu_->addAction(tr("ALL GLORY TO THE HYPNOTOAD"));
|
||||||
bask_in_his_glory_action_->setVisible(false);
|
bask_in_his_glory_action_->setVisible(false);
|
||||||
connect(bask_in_his_glory_action_, SIGNAL(triggered()), SLOT(Bask()));
|
connect(bask_in_his_glory_action_, SIGNAL(triggered()), SLOT(Bask()));
|
||||||
|
#endif // HAVE_BACKGROUND_STREAMS
|
||||||
|
|
||||||
// Animations
|
// Animations
|
||||||
connect(show_hide_animation_, SIGNAL(frameChanged(int)),
|
connect(show_hide_animation_, SIGNAL(frameChanged(int)),
|
||||||
|
@ -377,10 +385,14 @@ void NowPlayingWidget::paintEvent(QPaintEvent* e) {
|
||||||
void NowPlayingWidget::DrawContents(QPainter* p) {
|
void NowPlayingWidget::DrawContents(QPainter* p) {
|
||||||
switch (mode_) {
|
switch (mode_) {
|
||||||
case SmallSongDetails:
|
case SmallSongDetails:
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
if (hypnotoad_) {
|
if (hypnotoad_) {
|
||||||
p->drawPixmap(0, 0, small_ideal_height_, small_ideal_height_,
|
p->drawPixmap(0, 0, small_ideal_height_, small_ideal_height_,
|
||||||
hypnotoad_->currentPixmap());
|
hypnotoad_->currentPixmap());
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
// Draw the cover
|
// Draw the cover
|
||||||
p->drawPixmap(0, 0, small_ideal_height_, small_ideal_height_, cover_);
|
p->drawPixmap(0, 0, small_ideal_height_, small_ideal_height_, cover_);
|
||||||
if (downloading_covers_) {
|
if (downloading_covers_) {
|
||||||
|
@ -406,10 +418,13 @@ void NowPlayingWidget::DrawContents(QPainter* p) {
|
||||||
Qt::black);
|
Qt::black);
|
||||||
|
|
||||||
// Draw the cover
|
// Draw the cover
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
if (hypnotoad_) {
|
if (hypnotoad_) {
|
||||||
p->drawPixmap(x_offset, kTopBorder, total_size, total_size,
|
p->drawPixmap(x_offset, kTopBorder, total_size, total_size,
|
||||||
hypnotoad_->currentPixmap());
|
hypnotoad_->currentPixmap());
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
p->drawPixmap(x_offset, kTopBorder, total_size, total_size, cover_);
|
p->drawPixmap(x_offset, kTopBorder, total_size, total_size, cover_);
|
||||||
if (downloading_covers_) {
|
if (downloading_covers_) {
|
||||||
p->drawPixmap(x_offset + 45, 35, 16, 16,
|
p->drawPixmap(x_offset + 45, 35, 16, 16,
|
||||||
|
@ -448,10 +463,13 @@ void NowPlayingWidget::DrawContents(QPainter* p) {
|
||||||
Qt::black);
|
Qt::black);
|
||||||
|
|
||||||
// Draw the cover
|
// Draw the cover
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
if (hypnotoad_) {
|
if (hypnotoad_) {
|
||||||
p->drawPixmap(x_offset, kTopBorder, total_size, total_size,
|
p->drawPixmap(x_offset, kTopBorder, total_size, total_size,
|
||||||
hypnotoad_->currentPixmap());
|
hypnotoad_->currentPixmap());
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
p->drawPixmap(x_offset, kTopBorder, total_size, total_size, cover_);
|
p->drawPixmap(x_offset, kTopBorder, total_size, total_size, cover_);
|
||||||
if (downloading_covers_) {
|
if (downloading_covers_) {
|
||||||
p->drawPixmap(x_offset + 45, 35, 16, 16,
|
p->drawPixmap(x_offset + 45, 35, 16, 16,
|
||||||
|
@ -477,10 +495,13 @@ void NowPlayingWidget::DrawContents(QPainter* p) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the cover
|
// Draw the cover
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
if (hypnotoad_) {
|
if (hypnotoad_) {
|
||||||
p->drawPixmap(x_offset, kTopBorder, cover_size, cover_size,
|
p->drawPixmap(x_offset, kTopBorder, cover_size, cover_size,
|
||||||
hypnotoad_->currentPixmap());
|
hypnotoad_->currentPixmap());
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
p->drawPixmap(x_offset, kTopBorder, cover_size, cover_size, cover_);
|
p->drawPixmap(x_offset, kTopBorder, cover_size, cover_size, cover_);
|
||||||
if (downloading_covers_) {
|
if (downloading_covers_) {
|
||||||
p->drawPixmap(x_offset + 45, 35, 16, 16,
|
p->drawPixmap(x_offset + 45, 35, 16, 16,
|
||||||
|
@ -554,7 +575,9 @@ void NowPlayingWidget::contextMenuEvent(QContextMenuEvent* e) {
|
||||||
!art_is_not_set);
|
!art_is_not_set);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
bask_in_his_glory_action_->setVisible(static_cast<bool>(hypnotoad_));
|
bask_in_his_glory_action_->setVisible(static_cast<bool>(hypnotoad_));
|
||||||
|
#endif
|
||||||
|
|
||||||
// show the menu
|
// show the menu
|
||||||
menu_->popup(mapToGlobal(e->pos()));
|
menu_->popup(mapToGlobal(e->pos()));
|
||||||
|
@ -562,7 +585,12 @@ void NowPlayingWidget::contextMenuEvent(QContextMenuEvent* e) {
|
||||||
|
|
||||||
void NowPlayingWidget::mouseReleaseEvent(QMouseEvent* e) {
|
void NowPlayingWidget::mouseReleaseEvent(QMouseEvent* e) {
|
||||||
// Same behaviour as right-click > Show Fullsize
|
// Same behaviour as right-click > Show Fullsize
|
||||||
if (e->button() == Qt::LeftButton && !aww_ && !hypnotoad_.get()) {
|
bool can_show_cover = true;
|
||||||
|
if (aww_) can_show_cover = false;
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
|
if (hypnotoad_.get()) can_show_cover = false;
|
||||||
|
#endif
|
||||||
|
if (e->button() == Qt::LeftButton && can_show_cover) {
|
||||||
ShowCover();
|
ShowCover();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -589,6 +617,8 @@ void NowPlayingWidget::FitCoverWidth(bool fit) {
|
||||||
s.setValue("fit_cover_width", fit_width_);
|
s.setValue("fit_cover_width", fit_width_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
|
|
||||||
void NowPlayingWidget::AllHail(bool hypnotoad) {
|
void NowPlayingWidget::AllHail(bool hypnotoad) {
|
||||||
if (hypnotoad) {
|
if (hypnotoad) {
|
||||||
hypnotoad_.reset(new QMovie(kHypnotoadPath, QByteArray(), this));
|
hypnotoad_.reset(new QMovie(kHypnotoadPath, QByteArray(), this));
|
||||||
|
@ -601,6 +631,8 @@ void NowPlayingWidget::AllHail(bool hypnotoad) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // HAVE_BACKGROUND_STREAMS
|
||||||
|
|
||||||
void NowPlayingWidget::EnableKittens(bool aww) {
|
void NowPlayingWidget::EnableKittens(bool aww) {
|
||||||
if (!kittens_ && aww) {
|
if (!kittens_ && aww) {
|
||||||
kittens_ = new KittenLoader(this);
|
kittens_ = new KittenLoader(this);
|
||||||
|
@ -649,6 +681,8 @@ void NowPlayingWidget::SearchCoverAutomatically() {
|
||||||
GetCoverAutomatically();
|
GetCoverAutomatically();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
|
|
||||||
void NowPlayingWidget::Bask() {
|
void NowPlayingWidget::Bask() {
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||||
QScreen* screen = QWidget::screen();
|
QScreen* screen = QWidget::screen();
|
||||||
|
@ -662,6 +696,8 @@ void NowPlayingWidget::Bask() {
|
||||||
big_hypnotoad_->showFullScreen();
|
big_hypnotoad_->showFullScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // HAVE_BACKGROUND_STREAMS
|
||||||
|
|
||||||
void NowPlayingWidget::dragEnterEvent(QDragEnterEvent* e) {
|
void NowPlayingWidget::dragEnterEvent(QDragEnterEvent* e) {
|
||||||
if (AlbumCoverChoiceController::CanAcceptDrag(e)) {
|
if (AlbumCoverChoiceController::CanAcceptDrag(e)) {
|
||||||
e->acceptProposedAction();
|
e->acceptProposedAction();
|
||||||
|
|
|
@ -26,7 +26,9 @@
|
||||||
|
|
||||||
class AlbumCoverChoiceController;
|
class AlbumCoverChoiceController;
|
||||||
class Application;
|
class Application;
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
class FullscreenHypnotoad;
|
class FullscreenHypnotoad;
|
||||||
|
#endif
|
||||||
class KittenLoader;
|
class KittenLoader;
|
||||||
|
|
||||||
class QAction;
|
class QAction;
|
||||||
|
@ -71,7 +73,10 @@ class NowPlayingWidget : public QWidget {
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void Stopped();
|
void Stopped();
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
void AllHail(bool hypnotoad);
|
void AllHail(bool hypnotoad);
|
||||||
|
#endif
|
||||||
void EnableKittens(bool aww);
|
void EnableKittens(bool aww);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -104,7 +109,9 @@ class NowPlayingWidget : public QWidget {
|
||||||
void ShowCover();
|
void ShowCover();
|
||||||
void SearchCoverAutomatically();
|
void SearchCoverAutomatically();
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
void Bask();
|
void Bask();
|
||||||
|
#endif
|
||||||
|
|
||||||
void AutomaticCoverSearchDone();
|
void AutomaticCoverSearchDone();
|
||||||
|
|
||||||
|
@ -147,10 +154,12 @@ class NowPlayingWidget : public QWidget {
|
||||||
QPixmap previous_track_;
|
QPixmap previous_track_;
|
||||||
qreal previous_track_opacity_;
|
qreal previous_track_opacity_;
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKGROUND_STREAMS
|
||||||
static const char* kHypnotoadPath;
|
static const char* kHypnotoadPath;
|
||||||
QAction* bask_in_his_glory_action_;
|
QAction* bask_in_his_glory_action_;
|
||||||
std::unique_ptr<QMovie> hypnotoad_;
|
std::unique_ptr<QMovie> hypnotoad_;
|
||||||
std::unique_ptr<FullscreenHypnotoad> big_hypnotoad_;
|
std::unique_ptr<FullscreenHypnotoad> big_hypnotoad_;
|
||||||
|
#endif
|
||||||
|
|
||||||
std::unique_ptr<QMovie> spinner_animation_;
|
std::unique_ptr<QMovie> spinner_animation_;
|
||||||
bool downloading_covers_;
|
bool downloading_covers_;
|
||||||
|
|
Loading…
Reference in New Issue