PeriodicUpdateWidget.h
Go to the documentation of this file.
1#pragma once
2
3#include <QWidget>
4
5
6class QCheckBox;
7class QDoubleSpinBox;
8class QPushButton;
9class QTimer;
10
11namespace armarx::skills::gui
12{
13
14 class PeriodicUpdateWidget : public QWidget
15 {
16 Q_OBJECT
17 using This = PeriodicUpdateWidget;
18
19 public:
20 PeriodicUpdateWidget(double frequency = 2.0, double maxFrequency = 60);
21
22
23 QTimer* timer();
24
25 QCheckBox* autoCheckBox();
26 QDoubleSpinBox* frequencySpinBox();
27 QPushButton* updateButton();
28
29 bool isAutoEnabled() const;
30 double getUpdateFrequency() const;
31 int getUpdateIntervalMs() const;
32
34 void stopTimer();
35
36
37 public slots:
38 void disableAutoUpdate();
39
40 signals:
41
42 void update();
43
46
47 private slots:
48
49 void _updateTimerFrequency();
50 void _toggleAutoUpdates(bool enabled);
51
52 signals:
53
56
57 private:
58 QPushButton* _updateButton;
59 QCheckBox* _autoCheckBox;
60 QDoubleSpinBox* _frequencySpinBox;
61
62 QPushButton* _collapseAllButton;
63
64 QTimer* _timer;
65 };
66
67} // namespace armarx::skills::gui
PeriodicUpdateWidget(double frequency=2.0, double maxFrequency=60)