mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-02 12:02:09 +08:00
9a45a3b99b
* move hardware to system/ * fix mypy old-commit-hash: 1139fe507b01f34de9714c99228f411558b44231
35 lines
637 B
C++
35 lines
637 B
C++
#pragma once
|
|
|
|
#include <QPushButton>
|
|
|
|
#include "system/hardware/hw.h"
|
|
#include "selfdrive/ui/qt/widgets/controls.h"
|
|
|
|
// SSH enable toggle
|
|
class SshToggle : public ToggleControl {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
SshToggle() : ToggleControl("Enable SSH", "", "", Hardware::get_ssh_enabled()) {
|
|
QObject::connect(this, &SshToggle::toggleFlipped, [=](bool state) {
|
|
Hardware::set_ssh_enabled(state);
|
|
});
|
|
}
|
|
};
|
|
|
|
// SSH key management widget
|
|
class SshControl : public ButtonControl {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
SshControl();
|
|
|
|
private:
|
|
Params params;
|
|
|
|
QLabel username_label;
|
|
|
|
void refresh();
|
|
void getUserKeys(const QString &username);
|
|
};
|