wip
This commit is contained in:
@@ -11,6 +11,8 @@
|
|||||||
#include "selfdrive/ui/qt/widgets/prime.h"
|
#include "selfdrive/ui/qt/widgets/prime.h"
|
||||||
#include "system/hardware/hw.h"
|
#include "system/hardware/hw.h"
|
||||||
|
|
||||||
|
#include <QWebEngineView>
|
||||||
|
|
||||||
#ifdef ENABLE_MAPS
|
#ifdef ENABLE_MAPS
|
||||||
#include "selfdrive/ui/qt/maps/map_settings.h"
|
#include "selfdrive/ui/qt/maps/map_settings.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -88,6 +90,7 @@ void HomeWindow::offroadTransition(bool offroad) {
|
|||||||
if (offroad) {
|
if (offroad) {
|
||||||
sidebar->setVisible(false);
|
sidebar->setVisible(false);
|
||||||
slayout->setCurrentWidget(ready);
|
slayout->setCurrentWidget(ready);
|
||||||
|
// slayout->setCurrentWidget(home);
|
||||||
// this->showDriverView(true, true); // Temp
|
// this->showDriverView(true, true); // Temp
|
||||||
} else {
|
} else {
|
||||||
sidebar->setVisible(false);
|
sidebar->setVisible(false);
|
||||||
@@ -188,8 +191,13 @@ OffroadHome::OffroadHome(QWidget* parent) : QFrame(parent) {
|
|||||||
QHBoxLayout *home_layout = new QHBoxLayout(home_widget);
|
QHBoxLayout *home_layout = new QHBoxLayout(home_widget);
|
||||||
home_layout->setContentsMargins(0, 0, 0, 0);
|
home_layout->setContentsMargins(0, 0, 0, 0);
|
||||||
home_layout->setSpacing(30);
|
home_layout->setSpacing(30);
|
||||||
|
|
||||||
// Clearpilot: removed home ui widgets
|
// // Create a QWebEngineView
|
||||||
|
QWebEngineView *web_view = new QWebEngineView();
|
||||||
|
web_view->load(QUrl("http://fark.com"));
|
||||||
|
|
||||||
|
// Add the QWebEngineView to the layout
|
||||||
|
home_layout->addWidget(web_view);
|
||||||
}
|
}
|
||||||
center_layout->addWidget(home_widget);
|
center_layout->addWidget(home_widget);
|
||||||
|
|
||||||
|
|||||||
@@ -35,23 +35,23 @@ int main(int argc, char *argv[]) {
|
|||||||
window.setStyleSheet("background-color: black;");
|
window.setStyleSheet("background-color: black;");
|
||||||
window.showFullScreen();
|
window.showFullScreen();
|
||||||
|
|
||||||
auto windowHandle = window.windowHandle();
|
// auto windowHandle = window.windowHandle();
|
||||||
if (!windowHandle) {
|
// if (!windowHandle) {
|
||||||
fprintf(stderr, "Error: Unable to obtain window handle.\n");
|
// fprintf(stderr, "Error: Unable to obtain window handle.\n");
|
||||||
return 1;
|
// return 1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
|
// QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
|
||||||
auto *s = static_cast<wl_surface*>(native->nativeResourceForWindow("surface", windowHandle));
|
// auto *s = static_cast<wl_surface*>(native->nativeResourceForWindow("surface", windowHandle));
|
||||||
if (!s) {
|
// if (!s) {
|
||||||
fprintf(stderr, "Error: Unable to obtain native Wayland surface.\n");
|
// fprintf(stderr, "Error: Unable to obtain native Wayland surface.\n");
|
||||||
return 1;
|
// return 1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
wl_surface_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270);
|
// wl_surface_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270);
|
||||||
wl_surface_commit(s);
|
// wl_surface_commit(s);
|
||||||
|
|
||||||
window.setFixedSize(2160, 1080);
|
// window.setFixedSize(2160, 1080);
|
||||||
|
|
||||||
QVBoxLayout *layout = new QVBoxLayout(&window);
|
QVBoxLayout *layout = new QVBoxLayout(&window);
|
||||||
layout->setSpacing(0);
|
layout->setSpacing(0);
|
||||||
@@ -59,7 +59,7 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
// QString url = args.first();
|
// QString url = args.first();
|
||||||
QWebEngineView *web_view = new QWebEngineView();
|
QWebEngineView *web_view = new QWebEngineView();
|
||||||
web_view->load(QUrl("http://www.fark.com/"));
|
web_view->load(QUrl(argv[1])));
|
||||||
layout->addWidget(web_view);
|
layout->addWidget(web_view);
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
|
|||||||
Reference in New Issue
Block a user