wip
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) {
|
HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) {
|
||||||
_parent = parent;
|
_parent = parent;
|
||||||
// Start hidden at first
|
// Start hidden at first
|
||||||
_parent->setVisible(false);
|
// _parent->setVisible(false);
|
||||||
|
|
||||||
// CLEARPILOT Sidebar set to invisible in drive view.
|
// CLEARPILOT Sidebar set to invisible in drive view.
|
||||||
params.putBool("Sidebar", false);
|
params.putBool("Sidebar", false);
|
||||||
@@ -29,6 +29,7 @@ HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) {
|
|||||||
main_layout->setSpacing(0);
|
main_layout->setSpacing(0);
|
||||||
|
|
||||||
sidebar = new Sidebar(this);
|
sidebar = new Sidebar(this);
|
||||||
|
sidebar->setVisible(false);
|
||||||
main_layout->addWidget(sidebar);
|
main_layout->addWidget(sidebar);
|
||||||
QObject::connect(sidebar, &Sidebar::openSettings, this, &HomeWindow::openSettings);
|
QObject::connect(sidebar, &Sidebar::openSettings, this, &HomeWindow::openSettings);
|
||||||
|
|
||||||
@@ -37,6 +38,7 @@ HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) {
|
|||||||
|
|
||||||
home = new OffroadHome(this);
|
home = new OffroadHome(this);
|
||||||
QObject::connect(home, &OffroadHome::openSettings, this, &HomeWindow::openSettings);
|
QObject::connect(home, &OffroadHome::openSettings, this, &HomeWindow::openSettings);
|
||||||
|
home->setVisible(false);
|
||||||
slayout->addWidget(home);
|
slayout->addWidget(home);
|
||||||
|
|
||||||
onroad = new OnroadWindow(this);
|
onroad = new OnroadWindow(this);
|
||||||
@@ -98,11 +100,11 @@ void HomeWindow::offroadTransition(bool offroad) {
|
|||||||
slayout->setCurrentWidget(onroad);
|
slayout->setCurrentWidget(onroad);
|
||||||
uiState()->scene.map_open = onroad->isMapVisible();
|
uiState()->scene.map_open = onroad->isMapVisible();
|
||||||
}
|
}
|
||||||
_parent->setVisible(true);
|
// _parent->setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HomeWindow::showDriverView(bool show, bool started) {
|
void HomeWindow::showDriverView(bool show, bool started) {
|
||||||
_parent->setVisible(true);
|
// _parent->setVisible(true);
|
||||||
if (show) {
|
if (show) {
|
||||||
emit closeSettings();
|
emit closeSettings();
|
||||||
slayout->setCurrentWidget(driver_view);
|
slayout->setCurrentWidget(driver_view);
|
||||||
@@ -133,6 +135,7 @@ void HomeWindow::mousePressEvent(QMouseEvent* e) {
|
|||||||
// CLEARPILOT - click ready shows home
|
// CLEARPILOT - click ready shows home
|
||||||
if (!onroad->isVisible() && ready->isVisible()) {
|
if (!onroad->isVisible() && ready->isVisible()) {
|
||||||
sidebar->setVisible(true);
|
sidebar->setVisible(true);
|
||||||
|
home->setVisible(false);
|
||||||
slayout->setCurrentWidget(home);
|
slayout->setCurrentWidget(home);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user