Commit Graph

37 Commits

Author SHA1 Message Date
Dean Lee
65c5464138 ui: add translation files to assets.qrc (#29597)
* move translation files to assets.qrc

* cleanup

* add main_en

* dynamically add

* not sure if required

* revert to master

* move translations above assets

* add translations to qrc file

* comment

* now add translations_assets_src to assets sources

* this is built

* add to .gitignore

* consistent name

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 17bfff8e10
2023-08-25 19:05:35 -07:00
Dean Lee
db211ce617 cpplint: add filter whitespace/parens (#29565)
old-commit-hash: 5480d32bb5
2023-08-23 14:25:05 -07:00
Dean Lee
97e9d55588 cpplint: build/include_what_you_use (#29556)
* include_what_you_use

* remove comments

* include <memory>

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 2d99521e75
2023-08-23 13:25:17 -07:00
Dean Lee
42dd6af842 ui/networking: remove call to clearLayout (#29037)
* build list inplace

* move clearLayout to cabana

* cleanup include

* polish style

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: fd8a9c8520
2023-08-13 11:57:40 -07:00
Dean Lee
80e7b739b4 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>
old-commit-hash: b4f7e76531
2023-07-16 13:17:16 -07:00
Shane Smiskol
8e89512da7 ui: use stencil buffer to draw polygons (#28902)
* Update ui.cc

* add a bunch of debugging stuff i don't want to lose

* Revert "add a bunch of debugging stuff i don't want to lose"

This reverts commit 2de6ab5b68bc528e913db68f7fe576b6ebe89a9b.

* enable stencil buffer

* lower ui CPU usage

* Revert "lower ui CPU usage"

This reverts commit 650241c0d89c1476de3995f1dc3f87f671dd1dd7.
old-commit-hash: 936bfcd7ba
2023-07-13 20:38:49 -07:00
Dean Lee
ccba136b64 ui: remove function configFont. use struct InterFont (#28773)
old-commit-hash: 219590885f
2023-07-06 12:17:56 +02:00
Dean Lee
a8f8d0b512 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>
old-commit-hash: 5493cb4289
2023-06-30 13:45:58 -07:00
Dean Lee
7ac669d510 ui/sidebar: Fix the inconsistent padding in different languages. (#28746)
cleanup
old-commit-hash: 7ac22a0d7a
2023-06-30 13:40:28 -07:00
Willem Melching
075df3ec20 qt/util.c: clearLayout, support QFormLayout (#28105)
old-commit-hash: 7a31bd12af
2023-05-04 10:59:37 -07:00
Willem Melching
d4cea1f024 cabana: enable Hi-DPI support on MacOS (#27965)
old-commit-hash: 475903e244
2023-04-19 10:48:36 -07:00
Dean Lee
fa47048e44 cabana: use bootstrap icons (#26981)
* use bootstrap icons

* typo

* build into asset_obj

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

* ui fixups

* parse date

* cleanup
old-commit-hash: 4639862bae
2022-10-25 15:21:43 -07:00
Dean Lee
3b9197ffc4 getTextRect: pass text by const reference (#25555)
old-commit-hash: 3bb2b4df49
2022-08-25 13:13:38 -07:00
Adeeb Shihadeh
76a74b6830 UI: exit gracefully (#25388)
* UI: exit gracefully

* cleanup

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2cff05be43
2022-08-07 18:41:54 -07:00
Shane Smiskol
9e06421bfe Multilang: handle localized plurals (#25337)
* Add localized plural handling

* Do another location with plurals

* fix test
old-commit-hash: ecba873208
2022-08-02 12:44:21 -07:00
Shane Smiskol
23de7b166e 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
old-commit-hash: 949de4d2b6
2022-07-08 20:25:54 -07:00
Dean Lee
65e6ba763e Multilang: remove redundant QString() around tr() (#25003)
remove qstring
old-commit-hash: 8d53e2c2b4
2022-06-30 10:55:49 +02:00
Shane Smiskol
2c5e890a23 UI: wrap all text for translation (#24961)
* 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
2022-06-29 14:47:46 -07:00
Lee Jong Mun
0ff374975e selfdrive/ui/qt/util.cc: missing include (#24867)
old-commit-hash: 4172191723
2022-06-15 17:35:46 +02:00
Willem Melching
98742302c1 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
old-commit-hash: d528cd5568
2022-06-15 13:06:46 +02:00
Adeeb Shihadeh
9a45a3b99b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
old-commit-hash: 1139fe507b
2022-06-11 16:38:24 -07:00
Adeeb Shihadeh
f4675fc260 Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
old-commit-hash: cb8885cffb
2022-05-18 14:11:57 -07:00
Adeeb Shihadeh
5a9644261f remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
old-commit-hash: 5c48e7bc86
2022-04-18 17:55:23 -07:00
Willem Melching
7e12817e02 MacOS: ensure 1:1 rendering on HiDPI screens (#23860)
old-commit-hash: ca8d4e417e
2022-02-25 14:36:27 +01:00
Dean Lee
f0eb7a5402 qt/util: new function scaledPixmap (#23103)
* new function scaledPixmap

* rename to loadpixmap
old-commit-hash: 75687169eb
2021-12-14 22:58:47 -08:00
Dean Lee
b462e5584f move LayoutWidget,ClickableWidget to controls (#23207)
old-commit-hash: d4b8cba0f6
2021-12-14 11:00:01 +01:00
Dean Lee
88ebf835bb UI: move rest of NVG to Qt (#23133)
* move ui_draw_world to qt

* draw world if world_objects_visible is true

* cleanup

* cleanup includes

* continue

* cleanup

* cleanup

* enable  multisampling on all devices
old-commit-hash: 20f571db3c
2021-12-06 14:02:39 -08:00
Cameron Clough
8ad1abd8ba 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>
old-commit-hash: 140c7f430c
2021-11-18 15:53:21 +01:00
Willem Melching
dc3075790e 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
old-commit-hash: bef686f275
2021-11-04 14:32:32 +01:00
Dean Lee
b8ea2db6ae swagLogMessageHandler: replace magic number with macro (#21944)
old-commit-hash: e573985c10
2021-08-17 17:51:13 +02:00
Willem Melching
a2749618ec ui: remove cache from getDongleId()
old-commit-hash: d1fb979962
2021-08-02 11:29:39 +02:00
Dean Lee
c40edd4b56 qt/util: new function getDongleId (#21810)
* new function getDongleId

* return std::optional
old-commit-hash: 073b96e5d1
2021-08-02 11:21:51 +02:00
Dean Lee
86cc8f615c 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>
old-commit-hash: b7f8c6ad03
2021-07-07 21:19:56 -07:00
Willem Melching
34678fb7fb Qt logging through cloudlog (#21452)
* Qt logging through cloudlog

* sort imports

* rename to swaLogMessageHandler

* move to util

* info is high enough

* smaller diff
old-commit-hash: 54b6a9f121
2021-07-02 14:01:59 +02:00
Dean Lee
476a5e2e05 qt/util.h: move implementation to source file (#21412)
* Move implementation to source file

* space

* include the headers

* mv all to cc

* space
old-commit-hash: f90a3eeb20
2021-06-29 14:05:37 -07:00
Willem Melching
fba42aab80 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
old-commit-hash: 9f98a3e44f
2021-06-25 16:26:02 +02:00