raDIYo 0.4
swvolumewidget.h
1/***************************************************************************
2
3 source::worx raDIYo
4 Copyright © 2020-2022 c.holzheuer
5 c.holzheuer@sourceworx.org
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12***************************************************************************/
13
14
15#ifndef SWVOLUMEWIDGET_H
16#define SWVOLUMEWIDGET_H
17
18#include <swabstractbarwidget.h>
19
21{
22 Q_OBJECT
23
24public:
25
26 explicit SWVolumeWidget( QWidget* parent = nullptr );
27 virtual ~SWVolumeWidget();
28
29 void paintEvent( QPaintEvent* event ) override;
30
31public slots:
32
33
34signals:
35
36 void valueChanged( int newValue );
37
38protected:
39
40 void mousePressEvent( QMouseEvent* event ) override;
41 void mouseMoveEvent( QMouseEvent* event ) override;
42 void mouseReleaseEvent( QMouseEvent* event ) override;
43
44 //void resizeEvent(QResizeEvent *event) override;
45
46 const int _frameOffset = 2;
47 bool _moving = false;
48 int _lastPosX = -1;
49
50};
51
52#endif // SWVOLUMEWIDGET_H