mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-09-29 19:13:41 +08:00
f4675fc260
* Merge common/ and selfdrive/common * fix that * fix version * fix unit tests old-commit-hash: cb8885cffb313bea258c012c3026461a22bf8135
46 lines
737 B
C++
46 lines
737 B
C++
#pragma once
|
|
|
|
#include <map>
|
|
|
|
#include <QLabel>
|
|
#include <QPushButton>
|
|
#include <QVBoxLayout>
|
|
|
|
#include "common/params.h"
|
|
|
|
class AbstractAlert : public QFrame {
|
|
Q_OBJECT
|
|
|
|
protected:
|
|
AbstractAlert(bool hasRebootBtn, QWidget *parent = nullptr);
|
|
|
|
QPushButton *snooze_btn;
|
|
QVBoxLayout *scrollable_layout;
|
|
Params params;
|
|
|
|
signals:
|
|
void dismiss();
|
|
};
|
|
|
|
class UpdateAlert : public AbstractAlert {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
UpdateAlert(QWidget *parent = 0);
|
|
bool refresh();
|
|
|
|
private:
|
|
QLabel *releaseNotes = nullptr;
|
|
};
|
|
|
|
class OffroadAlert : public AbstractAlert {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit OffroadAlert(QWidget *parent = 0) : AbstractAlert(false, parent) {}
|
|
int refresh();
|
|
|
|
private:
|
|
std::map<std::string, QLabel*> alerts;
|
|
};
|