openpilot v0.9.6 release
date: 2024-01-12T10:13:37 master commit: ba792d576a49a0899b88a753fa1c52956bedf9e6
This commit is contained in:
32
selfdrive/ui/qt/widgets/ssh_keys.h
Normal file
32
selfdrive/ui/qt/widgets/ssh_keys.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#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(tr("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;
|
||||
|
||||
void refresh();
|
||||
void getUserKeys(const QString &username);
|
||||
};
|
||||
Reference in New Issue
Block a user