raDIYo 0.4
swadjustabledigit.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 SWADJUSTABLEDIGIT_H
16#define SWADJUSTABLEDIGIT_H
17
18#include <swflipdigit.h>
19#include <QTimer>
20
22{
23
24 Q_OBJECT
25
26public:
27
28 explicit SWAdjustableDigit( QWidget* parent = nullptr );
29 virtual ~SWAdjustableDigit();
30
31signals:
32
33protected slots:
34
35
36
37protected:
38
39 void mousePressEvent( QMouseEvent* event ) override;
40 void mouseMoveEvent( QMouseEvent* event ) override;
41 void mouseReleaseEvent( QMouseEvent* event ) override;
42
43 void timerEvent( QTimerEvent* event ) override;
44
45 bool _waiting = false;
46 int _delta = 0;
47 int _timerID = -1;
48 int _posY = -1;
49
50};
51
52#endif // SWADJUSTABLEDIGIT_H