Files
dragonpilot/selfdrive/ui/qt/widgets/ssh_keys.h

33 lines
615 B
C
Raw Normal View History

2021-01-27 12:07:17 +01:00
#pragma once
#include <QPushButton>
2021-01-27 12:07:17 +01:00
#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
2021-06-18 14:17:52 +08:00
class SshControl : public ButtonControl {
2021-01-27 12:07:17 +01:00
Q_OBJECT
public:
SshControl();
2021-01-27 12:07:17 +01:00
private:
Params params;
void refresh();
void getUserKeys(const QString &username);
2021-01-27 12:07:17 +01:00
};