Files
raDIYo/swvolumewidget.h
2025-08-05 22:36:00 +02:00

59 lines
1.2 KiB
C++

/***************************************************************************
source::worx raDIYo
Copyright © 2020-2022 c.holzheuer
chris@sourceworx.org
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
***************************************************************************/
#ifndef SWVOLUMEWIDGET_H
#define SWVOLUMEWIDGET_H
//#include <QWidget>
#include <swbarwidget.h>
/**
* @brief Widget zur Darstellung der Lautstärke
*/
class SWVolumeWidget : public SWBarWidget
{
Q_OBJECT
public:
explicit SWVolumeWidget( QWidget* parent = nullptr );
virtual ~SWVolumeWidget() = default;
void paintEvent( QPaintEvent* event ) override;
signals:
void deltaChanged( int newValue );
public slots:
void onDialDeltaChanged( int delta ) override;
protected:
void mousePressEvent( QMouseEvent* event ) override;
void mouseMoveEvent( QMouseEvent* event ) override;
void mouseReleaseEvent( QMouseEvent* event ) override;
const int _frameOffset = 2;
bool _moving = false;
};
#endif // SWVOLUMEWIDGET_H