raDIYo 0.4
swabstractcontrol.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 SWABSTRACTCONTROL_H
16#define SWABSTRACTCONTROL_H
17
18#include <QWidget>
19#include <QSettings>
20#include <QPropertyAnimation>
21#include <QGraphicsOpacityEffect>
22
24
25class SWAbstractControl : public QWidget
26{
27
28 Q_OBJECT
29
30public:
31
32 explicit SWAbstractControl( SWRaDIYoMainWidget* parent );
33 virtual ~SWAbstractControl();
34
35
36 virtual void fadeIn();
37 virtual void fadeOut();
38
39public slots:
40
41 virtual bool acceptDial();
42 virtual void onDialClicked();
43 virtual void onDialValueChanged( int value );
44
45protected:
46
47 static const int SWFADINGDURATION = 650;
48
49
50 bool _acceptDial = true;
51 SWRaDIYoMainWidget* _controller = nullptr;
52 int _value = -1;
53 QGraphicsOpacityEffect* _effect = nullptr;
54 QPropertyAnimation* _animFadeIn = nullptr;
55 QPropertyAnimation* _animFadeOut = nullptr;
56
57};
58
59#endif // SWABSTRACTCONTROL_H
virtual void onDialClicked()
Wird aufgerufen, wenn das (externe) Dial geklickt wurde.
virtual void onDialValueChanged(int value)
Wird aufgerufen, wenn das (externe) Dial gedreht wurde.