1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-19 12:53:25 +01:00

Make wheel events on the analyzer change the volume. Fixes issue 3761

This commit is contained in:
Vasily Fomin 2013-07-27 16:12:41 +10:00 committed by David Sansome
parent b31c646090
commit b1c488ffea
3 changed files with 10 additions and 1 deletions

View File

@ -123,7 +123,11 @@ void AnalyzerContainer::mouseDoubleClickEvent(QMouseEvent *) {
visualisation_action_->trigger();
}
void AnalyzerContainer::SetEngine(EngineBase *engine) {
void AnalyzerContainer::wheelEvent(QWheelEvent* e) {
emit WheelEvent(e->delta());
}
void AnalyzerContainer::SetEngine(EngineBase* engine) {
if (current_analyzer_)
current_analyzer_->set_engine(engine);
engine_ = engine;

View File

@ -37,9 +37,13 @@ public:
static const char* kSettingsGroup;
static const char* kSettingsFramerate;
signals:
void WheelEvent(int delta);
protected:
void mouseReleaseEvent(QMouseEvent *);
void mouseDoubleClickEvent(QMouseEvent *);
void wheelEvent(QWheelEvent* e);
private slots:
void ChangeAnalyzer(int id);

View File

@ -634,6 +634,7 @@ MainWindow::MainWindow(Application* app,
// Analyzer
ui_->analyzer->SetEngine(app_->player()->engine());
ui_->analyzer->SetActions(ui_->action_visualisations);
connect(ui_->analyzer, SIGNAL(WheelEvent(int)), SLOT(VolumeWheelEvent(int)));
// Equalizer
qLog(Debug) << "Creating equalizer";