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
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
39 signals:
40
41 void update();
42
45
46 private slots:
47
48 void _updateTimerFrequency();
49 void _toggleAutoUpdates(bool enabled);
50
51 signals:
52
55
56 private:
57 QPushButton* _updateButton;
58 QCheckBox* _autoCheckBox;
59 QDoubleSpinBox* _frequencySpinBox;
60
61 QPushButton* _collapseAllButton;
62
63 QTimer* _timer;
64 };
65
66} // namespace armarx
PeriodicUpdateWidget(double frequency=2.0, double maxFrequency=60)
double getUpdateFrequency() const
This file offers overloads of toIce() and fromIce() functions for STL container types.