mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-07 14:42:08 +08:00
e333e4f189
* cleanup include path * continue * format includes * fix testraw.cc * remove include path from SConstruct * regroup * rebase master * almost done * apply review * rename FileReader.xx to filereader.xx * rename Unlogger.x->unlogger.x * rename FrameReader.xx -> framereader.xx * apply reviews * ui.h * continue * fix framebuffer.cc build error:mv util.h up * full path to msm_media_info * fix qcom2 camerad Co-authored-by: Comma Device <device@comma.ai> old-commit-hash: 7222d0f20dc8edfe0d2f3417d1ce7c84fbd32805
78 lines
1.5 KiB
C++
78 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <QButtonGroup>
|
|
#include <QPushButton>
|
|
#include <QStackedWidget>
|
|
#include <QVBoxLayout>
|
|
#include <QWidget>
|
|
|
|
#include "selfdrive/ui/qt/offroad/wifiManager.h"
|
|
#include "selfdrive/ui/qt/widgets/input.h"
|
|
#include "selfdrive/ui/qt/widgets/ssh_keys.h"
|
|
#include "selfdrive/ui/qt/widgets/toggle.h"
|
|
|
|
class WifiUI : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit WifiUI(QWidget *parent = 0, WifiManager* wifi = 0);
|
|
|
|
private:
|
|
WifiManager *wifi = nullptr;
|
|
QVBoxLayout *vlayout;
|
|
|
|
QButtonGroup *connectButtons;
|
|
bool tetheringEnabled;
|
|
|
|
signals:
|
|
void connectToNetwork(Network n);
|
|
|
|
public slots:
|
|
void refresh();
|
|
void handleButton(QAbstractButton* m_button);
|
|
};
|
|
|
|
class AdvancedNetworking : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit AdvancedNetworking(QWidget* parent = 0, WifiManager* wifi = 0);
|
|
|
|
private:
|
|
LabelControl* ipLabel;
|
|
ButtonControl* editPasswordButton;
|
|
WifiManager* wifi = nullptr;
|
|
|
|
signals:
|
|
void backPress();
|
|
|
|
public slots:
|
|
void toggleTethering(bool enable);
|
|
void refresh();
|
|
};
|
|
|
|
class Networking : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit Networking(QWidget* parent = 0, bool show_advanced = true);
|
|
|
|
private:
|
|
QStackedLayout* s = nullptr; // nm_warning, wifiScreen, advanced
|
|
QWidget* wifiScreen = nullptr;
|
|
AdvancedNetworking* an = nullptr;
|
|
bool ui_setup_complete = false;
|
|
bool show_advanced;
|
|
|
|
Network selectedNetwork;
|
|
|
|
WifiUI* wifiWidget;
|
|
WifiManager* wifi = nullptr;
|
|
void attemptInitialization();
|
|
|
|
private slots:
|
|
void connectToNetwork(Network n);
|
|
void refresh();
|
|
void wrongPassword(QString ssid);
|
|
};
|
|
|