mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-18 13:33:53 +08:00
dd31ac2c18
* spinner for connecting * move that * cleanup * fix that * connecting label * touchups * cleanup old-commit-hash: 4f9ac7a1aa6e5d54fbd26991ca2d88edd02245b0
74 lines
1.4 KiB
C++
74 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <QButtonGroup>
|
|
#include <QMovie>
|
|
#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* main_layout;
|
|
QPixmap lock;
|
|
QPixmap checkmark;
|
|
QVector<QPixmap> strengths;
|
|
|
|
signals:
|
|
void connectToNetwork(const Network &n);
|
|
|
|
public slots:
|
|
void refresh();
|
|
};
|
|
|
|
class AdvancedNetworking : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit AdvancedNetworking(QWidget* parent = 0, WifiManager* wifi = 0);
|
|
|
|
private:
|
|
LabelControl* ipLabel;
|
|
WifiManager* wifi = nullptr;
|
|
|
|
signals:
|
|
void backPress();
|
|
|
|
public slots:
|
|
void toggleTethering(bool enabled);
|
|
void refresh();
|
|
};
|
|
|
|
class Networking : public QFrame {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit Networking(QWidget* parent = 0, bool show_advanced = true);
|
|
|
|
private:
|
|
QStackedLayout* main_layout = nullptr;
|
|
QWidget* wifiScreen = nullptr;
|
|
AdvancedNetworking* an = nullptr;
|
|
|
|
WifiUI* wifiWidget;
|
|
WifiManager* wifi = nullptr;
|
|
|
|
protected:
|
|
void showEvent(QShowEvent* event) override;
|
|
|
|
public slots:
|
|
void refresh();
|
|
|
|
private slots:
|
|
void connectToNetwork(const Network &n);
|
|
void wrongPassword(const QString &ssid);
|
|
};
|