Project

General

Profile

Feature #803

[statusicon-qt] Please add support for mouse wheel up and down events

Added by Artem S. Tashkinov almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Minor
Assignee:
-
Category:
plugins/statusicon
Target version:
Start date:
June 29, 2018
Due date:
% Done:

100%

Estimated time:
Affects version:

Description

The Qt5 documentation says it's possible under the X11 platform. On other platforms these events will not be generated, so #ifdef's are not required.

I tried to hack a solution via

void StatusIcon::wheelEvent(QWheelEvent *event)
{
    if (event->delta() >= 0)
        aud_drct_pl_next ();
    else
        aud_drct_pl_prev ();

    event->accept();
}

but it obviously won't work since StatusIcon doesn't inherit QWidget.

Probably that could be done via installEventFilter() but my C++ knowledge is nul.

History

#1 Updated by John Lindgren almost 6 years ago

  • % Done changed from 0 to 100
  • Target version set to 3.10
  • Status changed from New to Closed
  • Affects version 3.9 added
  • Affects version deleted (3.9.1)

QSystemTrayIcon just has an event() function and you have to cast the QEvent based on its type.

I went ahead and copied over all the scroll actions from the GTK version:
https://github.com/audacious-media-player/audacious-plugins/commit/b461d8ef9b6224044cd7bfe6535aa1c9d4596a30

#2 Updated by Artem S. Tashkinov almost 6 years ago

Great many thanks John!

Also available in: Atom PDF