-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
073a1f9
commit ca1712f
Showing
9 changed files
with
142 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#include "selfdrive/ui/qt/widgets/wifi.h" | ||
|
||
#include <QHBoxLayout> | ||
#include <QLabel> | ||
#include <QPushButton> | ||
|
||
WiFiPromptWidget::WiFiPromptWidget(QWidget *parent) : QWidget(parent) { | ||
QVBoxLayout *main_layout = new QVBoxLayout(this); | ||
main_layout->setContentsMargins(48, 48, 48, 32); | ||
main_layout->setSpacing(32); | ||
|
||
QHBoxLayout *title_layout = new QHBoxLayout; | ||
{ | ||
// TODO: icon pixmap | ||
QLabel *title = new QLabel(tr("Setup Wi-Fi")); | ||
title->setStyleSheet("font-size: 64px; font-weight: 700;"); | ||
title_layout->addWidget(title); | ||
title_layout->addStretch(); | ||
} | ||
main_layout->addLayout(title_layout); | ||
|
||
QLabel *desc = new QLabel(tr("Connect to Wi-Fi to upload driving data and help improve openpilot")); | ||
desc->setStyleSheet("font-size: 36px;"); | ||
desc->setWordWrap(true); | ||
main_layout->addWidget(desc); | ||
|
||
QPushButton *settings_btn = new QPushButton(tr("Open Settings")); | ||
settings_btn->setContentsMargins(96, 32, 96, 32); | ||
settings_btn->setStyleSheet(R"( | ||
QPushButton { | ||
font-size: 48px; | ||
font-weight: 500; | ||
border-radius: 10px; | ||
background-color: #465BEA; | ||
} | ||
QPushButton:pressed { | ||
background-color: #3049F4; | ||
} | ||
)"); | ||
main_layout->addWidget(settings_btn, 0, Qt::AlignHCenter); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#pragma once | ||
|
||
#include <QWidget> | ||
|
||
class WiFiPromptWidget : public QWidget { | ||
Q_OBJECT | ||
|
||
public: | ||
explicit WiFiPromptWidget(QWidget* parent); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters