mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-08 14:22:05 +08:00
2c5e890a23
* rough multiple language demo
* more wrappings
* stash
* add some bad translations
* updates
* map from french to spanish still has same problem of needing to call setText on everything
* add files
* restart UI
* use return code
* relative path
* more translations
* don't loop restart
* Toggle and prime translations
* try on device
* try QComboBox with readable style
* stash
* not yet scrollable
* stash
* dynamic translations (doesn't work for dynamic widget strings yet)
* clean up multiple option selector
* store languages in json
* try transparent
* Try transparent popup
* see how this looks
* tweaks
* clean up
* clean up
* clean up 2 and missing tr
* wrap more strings
* missing updater
* fixes
* add basic test to ensure all strings wrapped
* try in CI
* clean up
* test name
* fix test
* always install qt dev tools
* fix deps
* fast test
* add section so it prints multiple errors
* debug
* debug
get rid of those
* make any difference?
* comment
* oh...
* run with offscreen platform
* try out section
* clean up
* fix missing wrappings (it works!)
* move down
* space
* clear relevant params, set TICI=1
old-commit-hash: 879a7c3201
35 lines
641 B
C++
35 lines
641 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;
|
|
|
|
QLabel username_label;
|
|
|
|
void refresh();
|
|
void getUserKeys(const QString &username);
|
|
};
|