Commit Graph

30 Commits

Author SHA1 Message Date
Dean Lee
b4f7e76531 ui/util: add a helper class ParamWatcher (#28978)
* new class ParamWatcher

* Update selfdrive/ui/qt/util.cc

* Update selfdrive/ui/qt/util.h

* Update selfdrive/ui/qt/util.cc

* Update selfdrive/ui/qt/util.cc

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-07-16 13:17:16 -07:00
Dean Lee
219590885f ui: remove function configFont. use struct InterFont (#28773) 2023-07-06 12:17:56 +02:00
Dean Lee
5493cb4289 ui/settings: allow driving personality without CarParams (#28753)
* allow driving personality without CarParams

* rename to hasLongitudinalControl

* Update selfdrive/ui/qt/util.cc

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-06-30 13:45:58 -07:00
Dean Lee
7ac22a0d7a ui/sidebar: Fix the inconsistent padding in different languages. (#28746)
cleanup
2023-06-30 13:40:28 -07:00
Shane Smiskol
e780cca8b6 seldrive: use common sig handler (#28127)
* Update main.cc

* Update util.h

* same for navd
2023-05-08 14:27:04 -07:00
Willem Melching
475903e244 cabana: enable Hi-DPI support on MacOS (#27965) 2023-04-19 10:48:36 -07:00
Dean Lee
c21d9408a1 cabana: use bootstrap icons (#26981)
* use bootstrap icons

* typo

* build into asset_obj

* add to files_common
2023-01-18 13:19:23 -08:00
Adeeb Shihadeh
4639862bae UI: show git commit date (#26240)
* show version description while offroad

* ui fixups

* parse date

* cleanup
2022-10-25 15:21:43 -07:00
Dean Lee
3bb2b4df49 getTextRect: pass text by const reference (#25555) 2022-08-25 13:13:38 -07:00
Shane Smiskol
949de4d2b6 UI: Internationalization support (#21212)
* 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

* update names

* Add Chinese (Simplified) translations

* Do missing French translations

* unit tests caught that :)

* fix test

* fix other test (on PC)

* add entries to dialog to test

* add cancel button, clean up a bit

* just chinese

* some clean up

* use quotes

* clean up

* Just quit, set timeout to 0

* half a second

* use exitcode

* don't print if it's expected

* this comment is outdated

* update translations

* Update translations

* re-order input classes

* Update line numbers

* use enabled property for button style

* Get rid of ListWidget

* Update line numbers

* Log failed to load language

* Log failed to load language

* Move to utils and fix english logging

extra line

* Update translations

* spacing

* looks a bit better

* try this instead of exitcode

fixes

fix

* only one function

* comment

* Update line numbers

* fixup some japanese translations

* clean up multi option dialog

* Update line numbers
2022-07-08 20:25:54 -07:00
Willem Melching
d528cd5568 UI: new set speed design, show speed limits (#24736)
* basic US design

* place based on center position

* fix typo

* eu sign without rounded box

* same as steering wheel icon

* proper rounded bottom for eu sign

* add border

* proper placement/sizes

* needs to be semi bold

* color changes

* only when engaged

* move helpers into util.h

* Fix MAX placement

* only change color when at least 5 over

* implement override state

* pixel perfect spacing around us sign
2022-06-15 13:06:46 +02:00
Willem Melching
ca8d4e417e MacOS: ensure 1:1 rendering on HiDPI screens (#23860) 2022-02-25 14:36:27 +01:00
Dean Lee
75687169eb qt/util: new function scaledPixmap (#23103)
* new function scaledPixmap

* rename to loadpixmap
2021-12-14 22:58:47 -08:00
Dean Lee
d4b8cba0f6 move LayoutWidget,ClickableWidget to controls (#23207) 2021-12-14 11:00:01 +01:00
Cameron Clough
140c7f430c api: send User-Agent on network requests (#22965)
* api: set User-Agent on network requests

The format of the User-Agent header matches the format in `common/api/__init__.py`.

Closes #22954.

* Update selfdrive/ui/qt/util.cc

* fix parentheses

* refactor into function

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-18 15:53:21 +01:00
Willem Melching
bef686f275 Move navigation into separate daemon (#22767)
* Add navd folder

* prints route instructions to console

* broadcast NavInstuction without lanes

* show basic instructions and eta

* parse out lane info

* use swaglog

* clip distance on ui side

* draw lane directions

* show route

* add to process config

* add to release files

* small cleanup

* show route without gps

* pop open map on initial route

* fix error messages around no gps

* done

* make persistent process

* handle end of route

* clear route on offroad

* only one timer

* fix layout hacks

* explicit rendering at 20Hz
2021-11-04 14:32:32 +01:00
Dean Lee
073b96e5d1 qt/util: new function getDongleId (#21810)
* new function getDongleId

* return std::optional
2021-08-02 11:21:51 +02:00
Adeeb Shihadeh
bec054116f nav: scroller for recents (#21549)
* nav: scroller for recents

* stretch

* one more stretch
2021-07-10 22:56:18 -07:00
Dean Lee
b7f8c6ad03 qt/spinner: reduce CPU usage from 17% to 12% (#21495)
* faster spinner

* initApp

* no brightness

* Update selfdrive/ui/qt/util.h

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-07-07 21:19:56 -07:00
Willem Melching
54b6a9f121 Qt logging through cloudlog (#21452)
* Qt logging through cloudlog

* sort imports

* rename to swaLogMessageHandler

* move to util

* info is high enough

* smaller diff
2021-07-02 14:01:59 +02:00
Dean Lee
f90a3eeb20 qt/util.h: move implementation to source file (#21412)
* Move implementation to source file

* space

* include the headers

* mv all to cc

* space
2021-06-29 14:05:37 -07:00
Willem Melching
9f98a3e44f nav: show recents (#21405)
* add recent buttons

* remove static request

* layout

* recent doesn't have to be a favorite

* work

* spacing

* spacing

* no recents

* query next

* not null

* this needs to live here

* less spacing between items
2021-06-25 16:26:02 +02:00
Dean Lee
2c6d27f482 Qt: cleanup includes (#21282)
* cleanup includes

* remove include <qtwidgets>

* more
2021-06-16 00:08:02 -07:00
Dean Lee
5baad4692d qt/util.h: new functions getBrand&getBrandVersion (#21238) 2021-06-11 17:20:29 -07:00
Dean Lee
a8b6178c1e configFont: pass family by const reference (#21216) 2021-06-10 00:05:52 -07:00
Dean Lee
9429bd2783 qt/util.h : add new function setQtSurfaceFormat (#21206) 2021-06-09 14:09:49 +02:00
Willem Melching
e66bbec52b Update UI fixes/improvements (#21089)
* Show latest update time

* utc

* make work more than once

* cleanup

* whitespace

* only while offroad
2021-05-31 15:33:49 +02:00
Maxime Desroches
e3f6360e45 UI: Updated in settings (#21051)
* last update time + release notes

* remove test

* revert to previous constructor

* change label name

* time format for last update check

* cleanup

* add time formatting function

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-05-28 21:15:45 -07:00
Willem Melching
86aefbe766 Mapbox widget (#20751)
* squash mapbox stuff

* only hacks for pc

* no hack there

* only update when needed

* get destination from param

* no need for user agent

* add athena method

* change nav path color

* layout cleanups

* margin top

* add build scripts

* rename header file

* set pitch

* fix icon blinking

* keep both options

* draw on top to fix last blinking

* only recomput with gps

* fix include

* put map in onroadwidget

* update mapbox plugin to allow specifying directions url

* cycle through views

* dynamic resize

* only when present

* add map_helpers

* whitespace

* small fixes

* let scons decide

* update setup files

* implicit dependency

* fix alerts

* Update selfdrive/ui/SConscript

* move clearLayout to util.h

* only build when map.cc present

* move maps to own folder

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-05-17 14:57:07 +02:00
Adeeb Shihadeh
e06f9828ea match nvg onroad alerts (#20854) 2021-05-10 22:09:36 -07:00