You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
615 B
33 lines
615 B
2 years ago
|
#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);
|
||
|
};
|