mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-24 08:23:52 +08:00
* cleanup include path * continue * format includes * fix testraw.cc * remove include path from SConstruct * regroup * rebase master * almost done * apply review * rename FileReader.xx to filereader.xx * rename Unlogger.x->unlogger.x * rename FrameReader.xx -> framereader.xx * apply reviews * ui.h * continue * fix framebuffer.cc build error:mv util.h up * full path to msm_media_info * fix qcom2 camerad Co-authored-by: Comma Device <device@comma.ai>
36 lines
661 B
C++
36 lines
661 B
C++
#pragma once
|
|
|
|
#include <QPushButton>
|
|
|
|
#include "selfdrive/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 AbstractControl {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
SshControl();
|
|
|
|
private:
|
|
Params params;
|
|
|
|
QPushButton btn;
|
|
QLabel username_label;
|
|
|
|
void refresh();
|
|
void getUserKeys(const QString &username);
|
|
};
|