openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 200 supported car makes and models.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
575 B

#include <array>
#include <QTimer>
#include <QLabel>
#include <QWidget>
#include <QPixmap>
#include <QProgressBar>
#include <QSocketNotifier>
constexpr int spinner_fps = 30;
constexpr QSize spinner_size = QSize(360, 360);
class Spinner : public QWidget {
Q_OBJECT
public:
explicit Spinner(QWidget *parent = 0);
private:
int track_idx;
QLabel *comma, *track;
QLabel *text;
QProgressBar *progress_bar;
std::array<QPixmap, spinner_fps> track_imgs;
QTimer *rotate_timer;
QSocketNotifier *notifier;
public slots:
void rotate();
void update(int n);
};