Files
oscarpilot/selfdrive/ui/qt/body.cc
Your Name 9e994a28af wip
2024-02-13 19:52:00 -06:00

51 lines
1.2 KiB
C++

#include "selfdrive/ui/qt/body.h"
#include <cmath>
#include <algorithm>
#include <QPainter>
#include <QStackedLayout>
#include <QApplication>
#include <QGridLayout>
#include <QString>
#include <QTransform>
#include <QPixmap>
#include <QWebEngineView> // Include the QWebEngineView header
#include "common/params.h"
#include "common/timing.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/qt/qt_window.h"
#include "selfdrive/ui/qt/util.h"
void LogoWidget::paintEvent(QPaintEvent *event) {
QPainter painter(this);
}
BodyWindow::BodyWindow(QWidget *parent) : QWidget(parent) {
// Create a QWebEngineView
QWebEngineView *view = new QWebEngineView(this);
view->setUrl(QUrl("http://www.fark.com/")); // Set the URL to fark.com
QGridLayout *layout = new QGridLayout(this);
layout->setSpacing(0);
layout->setMargin(0); // Set margin to 0 to fill the entire window
layout->addWidget(view, 0, 0); // Add the view to the layout
setAttribute(Qt::WA_OpaquePaintEvent);
setStyleSheet(R"(
BodyWindow {
background-color: blue;
}
)");
QObject::connect(uiState(), &UIState::uiUpdate, this, &BodyWindow::updateState);
}
void BodyWindow::updateState(const UIState &s) {
}
void BodyWindow::offroadTransition(bool offroad) {
}