Files
oscarpilot/selfdrive/ui/qt/widgets/ssh_keys.h
FrogAi 08e9fb1edc openpilot v0.9.6 release
date: 2024-01-12T10:13:37
master commit: ba792d576a49a0899b88a753fa1c52956bedf9e6
2024-01-12 22:39:28 -07:00

33 lines
615 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(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);
};