openpilot v0.9.6 release
date: 2024-02-21T23:02:42 master commit: 0b4d08fab8e35a264bc7383e878538f8083c33e5
This commit is contained in:
46
selfdrive/ui/qt/widgets/offroad_alerts.h
Normal file
46
selfdrive/ui/qt/widgets/offroad_alerts.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#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;
|
||||
};
|
||||
Reference in New Issue
Block a user