wip
This commit is contained in:
@@ -17,6 +17,10 @@
|
||||
// HomeWindow: the container for the offroad and onroad UIs
|
||||
|
||||
HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) {
|
||||
_parent = parent;
|
||||
// Start hidden at first
|
||||
_parent->setVisible(false);
|
||||
|
||||
// CLEARPILOT Sidebar set to invisible in drive view.
|
||||
params.putBool("Sidebar", false);
|
||||
|
||||
@@ -52,7 +56,9 @@ HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) {
|
||||
showDriverView(false);
|
||||
});
|
||||
slayout->addWidget(driver_view);
|
||||
|
||||
setAttribute(Qt::WA_NoSystemBackground);
|
||||
|
||||
QObject::connect(uiState(), &UIState::uiUpdate, this, &HomeWindow::updateState);
|
||||
QObject::connect(uiState(), &UIState::offroadTransition, this, &HomeWindow::offroadTransition);
|
||||
QObject::connect(uiState(), &UIState::offroadTransition, sidebar, &Sidebar::offroadTransition);
|
||||
@@ -92,9 +98,11 @@ void HomeWindow::offroadTransition(bool offroad) {
|
||||
slayout->setCurrentWidget(onroad);
|
||||
uiState()->scene.map_open = onroad->isMapVisible();
|
||||
}
|
||||
_parent->setVisible(true);
|
||||
}
|
||||
|
||||
void HomeWindow::showDriverView(bool show, bool started) {
|
||||
_parent->setVisible(true);
|
||||
if (show) {
|
||||
emit closeSettings();
|
||||
slayout->setCurrentWidget(driver_view);
|
||||
@@ -121,6 +129,7 @@ void HomeWindow::mousePressEvent(QMouseEvent* e) {
|
||||
// params.putBool("Sidebar", sidebar->isVisible());
|
||||
// }
|
||||
|
||||
|
||||
// CLEARPILOT - click ready shows home
|
||||
if (!onroad->isVisible() && ready->isVisible()) {
|
||||
sidebar->setVisible(true);
|
||||
|
||||
Reference in New Issue
Block a user