  protected:
    void paintEvent(QPaintEvent*) override;
  
  private:
    QVBoxLayout layout;
  
    const float _dotspace = 37; // spacing between dots
    const float _top = 10;
    const float _dia = 28; // dot diameter
  };
 
</s> remove   StatusWidget(QString label, QString msg, QColor c, QWidget* parent = 0);
  void update(QString label, QString msg, QColor c);
 </s> add   StatusWidget(bool has_substatus, QWidget* parent = 0);
  void update(const QString &label, const QColor &c, const QString &msg = ""); </s> remove   QLabel status;
  QLabel substatus;
  QVBoxLayout layout;
 </s> add   QVBoxLayout *layout; </s> remove void StatusWidget::update(QString label, QString msg, QColor c) {
  status.setText(label);
  substatus.setText(msg);

 </s> add void StatusWidget::update(const QString &label, const QColor &c, const QString &msg) {
  status->setText(label);
  if (substatus != nullptr) {
    substatus->setText(msg);
  } </s> remove   SignalWidget(QString text, int strength, QWidget* parent = 0);
  void update(QString text, int strength);
  QLabel label;
 </s> add   SignalWidget(QWidget* parent = 0);
  void update(const QString &text, int strength);
  QLabel *label;
  QVBoxLayout *layout;
  protected:
    void paintEvent(QPaintEvent*) override;
  
  private:
  QVBoxLayout *layout;
  
    const float _dotspace = 37; // spacing between dots
    const float _top = 10;
    const float _dia = 28; // dot diameter
  };
keep keep keep keep replace keep keep keep keep keep
 Sidebar: update text and color in one place (#20777)

* do not set text&color in ctor

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> 
selfdrive/ui/qt/sidebar.h