From 0bba0e5612f34fdbbbac70937f5b73325d16cddf Mon Sep 17 00:00:00 2001 From: hawkeyexp Date: Fri, 31 Aug 2018 14:04:55 +0200 Subject: [PATCH] Rework with new gui --- assets/bg_buttons.png | Bin 4056 -> 0 bytes assets/bg_dashcam.png | Bin 5547 -> 0 bytes assets/bg_exit.png | Bin 3456 -> 0 bytes assets/bg_rearcam.png | Bin 1758 -> 0 bytes assets/{circle-pressed.png => bug-hot.png} | Bin 3156 -> 3585 bytes assets/connect.png | Bin 12888 -> 0 bytes assets/{circle.png => eye-hot.png} | Bin 3206 -> 3497 bytes assets/resources.qrc | 14 +- assets/{circle-hot.png => skin-hot.png} | Bin 3056 -> 3698 bytes assets/slider.png | Bin 3091 -> 0 bytes assets/{kodi-hot.png => volume-hot.png} | Bin 3409 -> 3567 bytes .../autoapp/Configuration/Configuration.hpp | 17 + .../autoapp/Configuration/IConfiguration.hpp | 6 + .../f1x/openauto/autoapp/UI/MainWindow.hpp | 84 +- .../openauto/autoapp/UI/SettingsWindow.hpp | 1 + src/autoapp/Configuration/Configuration.cpp | 46 + src/autoapp/UI/MainWindow.cpp | 1013 ++++-- src/autoapp/UI/SettingsWindow.cpp | 16 + src/autoapp/UI/mainwindow.ui | 2997 ++++++++++++----- src/autoapp/UI/settingswindow.ui | 103 +- src/autoapp/autoapp.cpp | 22 +- 21 files changed, 3133 insertions(+), 1186 deletions(-) delete mode 100644 assets/bg_buttons.png delete mode 100644 assets/bg_dashcam.png delete mode 100644 assets/bg_exit.png delete mode 100644 assets/bg_rearcam.png rename assets/{circle-pressed.png => bug-hot.png} (76%) delete mode 100644 assets/connect.png rename assets/{circle.png => eye-hot.png} (78%) rename assets/{circle-hot.png => skin-hot.png} (73%) mode change 100644 => 100755 delete mode 100644 assets/slider.png rename assets/{kodi-hot.png => volume-hot.png} (76%) diff --git a/assets/bg_buttons.png b/assets/bg_buttons.png deleted file mode 100644 index 49cab1ca0df827693d873a9b5da9f7f3372fdb62..0000000000000000000000000000000000000000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-B96;QxTKACY~COD{(`T!Uk6VDHi&(MLWbf(TZ`EXLF z0j@*TK*L>pGpIWVftsGup|Km~co?qug!`W)YtMm?#R;iLF47LIg1g*5q}OPB^0}|* zu;ib&g+ulG6}ORx77pCN z|7E8&IU%p2wb0ubAN9>7|H_bxk>=Y-_CM<W{VFHlJC{6E$lz+mH6L f?d_w!Z_@y!AMD1LV73_QrxP&JGt;esJIDSnJR+Og diff --git a/assets/bg_dashcam.png b/assets/bg_dashcam.png deleted file mode 100644 index 238d20755a26d3059bf4949c2df9f15b1b5fb4bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5547 zcmai12{@GN`+jHayJTN#q-5WhWE)E%BwLmiOEF5ao+x2dA{U4g;-*x?6muGz6JJ0(*&wby|{e7+-I%vekEXWK1U^6i`v;qK2 z1OQXXNDuGyvK|hFA51>R4*meJY(;)CAT5I*0A`C*1_p-?d3XnS`+Io%;7kk*a6W$C z?x)VU0T48hX-%-Pp5oPB8vdql8b!Qe>TSith_lj=QGPX8R{5W zZy76FsuEfA^tWw!f4Q}(<-@ofKAd@{58z}hJ1OeFCWZmap;}tfJL(vo0ZdR23nQpA zPp?xDj@;n*te<)mL%f2i3rO5!%1Gn}_zQ9R4*`BZhM1WmZVj?&fpgml*D-KN7C7$? z``81Bnaioc7;xlwjR{-4ZrcD~)oh(o=v2!;DkDq|L z4o;R*z{m;|ETbYM0c|jFel8{!1g@k4?)`IiT3@A$IVYtcQmLg{{qC+AT94x_*?%m>xR-L^D?s+tfZeW4zJo6PArtk)9n*Caz?ADef^#F5fuAwAgv22Rp9mUzcp&^?Kvv=!nb;jn0TF zczjw16PzfUd+Y?wqUml<`+&O9B>?8CyzAdcFwzh`E`R6@+?dr}Gs@lti0&rWeE~Rb zxKqyNWtna(BLIfk;Zl$Fgud1D%hb^e*V7Hwv#dI+UD4m!)S%C)&wP?7?B^_5cu8O4 z>Z`{hQqJ;k@FFU8mL6A=eAwk0Y%AHdeK>x&FlNOE)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Gd^V$gj!m-2w~wzz}$o!u0kmOQxY-3NHZ6ikP2ZZ zc&H^Gx5MyMMRC{?7SGg(jsGaL(%v^W8X z()|=fqQW0hZT>qAmK2K$M{>aUb^}1Cihg<%@$=R4SpnZN)%h z{5ih}$FNr_Sx21z87@;CM20$&e^V3QKu~4Tc|ll!Nl@(nu=4x0MhDt>(=VD^5r!Nw z5>P{M2n6{N^rU`aY7Ybo8z-P+1>FiAt~w1m zEJzsTWCTPA*ZY@oJqR1kzuH50|D|GoWbkCc1ZsdekY+eMFj^rF7NwDaf$=wS#ahGC zDgXj*3HU}8HR24>s5Dzo(W0ga%b*rFhB(Oo5C$SK9wI6cjCcTw+mSi109rf{sAvQ-R7i5**LC}cZO|=vp)`s7vyh!})Hd&ML|I+N9>A<#;+aF!P=a3 zZfF;>z>E0P$Nv8ugh2$Oxe5t!n?u-*e@4i%0(ToJ`1 zAR-0++&8eUq(>5B$F&I#0w-eEDA+U^)Zs@SSU-9GmDp3FL61cq@=&k;we^fR`qccT z7S0o!Hu&@G8Sy??Dhdm-V{yASEb8BtSJKn}2l=c^u(IEBRH3qd&q1|t*6$xBc{*>h zvnew~em^_>JKq->UO5n$hQ)$_!Lt;dC1C)RbZWhVM>POAsYUi$NuC5C;cF*_)S5*D z@GWB$(ntriwCwjUNFzg}5YlvH76Yi8So5F|Iv)|gkCBYBm_VJI_CT54#!T(vpMhB$ z%gJ6&Ba2y+G{8r)c3|=E@49f|t)~3?PW`#nE&stl&zJUc`1Iku_GdIt4$H8U*e@ylr KG%VJ4zVv^h3r4d5 diff --git a/assets/bg_exit.png b/assets/bg_exit.png deleted file mode 100644 index a3efc17b6c4a10eb967334c896d89a55d1ad124e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3456 zcmV-`4S({9P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_A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ug-hot.png index 6d40bdc87d654ba3d2716afdef1d547b674e7dcc..3377d74823e3387753f07d88a80748cfc5440203 100644 GIT binary patch delta 848 zcmV-W1F!tl7=awHzY2c?EJ;K`RCwC#n$JrWQ545NPoG&7D4`))V799uEkZ?iAru6L zREr3MHYT=<{(+2yen7M^brV5>kZDBAXc;DGLBDpAWCa!U!+vSjY0-Ib8Rm`e#Z1oh z&Vk{cIrpCP?)x}z?)P3yi3o*kMHILh00UqE41fVJ00zJS7yy3*U;qq&0Wbgt;GfzC z;0kbA{Ux!~5}gQb1|9-wy6 zl!Rpv5ovaowR29qK}5y_mcVflX>`W-I(;os%rz@N1h|-_6QMi6PM`RU z?(s8zwa=KlS#lHe65Il8%%;IS+TYJ=wMHTV^Z}1NyTWV$vOR`1TB9#%0EU1r^&bF} ze^FynbJ1Euk<2s#b#>HHaRVBw^U?j&PR_JXf4zV94LGr`BuL?mlkPeoF=Us!FU9o~8D_p`JAJ;0?S{h|y zRnIOob;T90RyRczuBWS7G%mamnZ`1+^Uax|7zRwo$Al;Ju_JpclKH?7W#*tE{{P2gPD$KA(*tM8N_=kd~UtksltxN5&}mbC%{BZmV6lRyIl3(?GagyIXwO=KMwuN6vqKc8>LyEXkG zQxkcwB-DQk6Tv%LbZ*KbSX7>5JTXUK3m+AW#^Qdp=Qr&HS`v3dF;}Wwg+WUVr e21$5*%x3toD{Qfh;9rvM diff --git a/assets/connect.png b/assets/connect.png deleted file mode 100644 index 78143b9365b97dee09e8146eb8e08904ff74f541..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12888 zcmcI~2UL^W(r6SF6#+epsFWZcL2BqdR0Wl$KnyLRh7O^GUV@5p1i_>94k|5_(0fr4 zP+Dja2_2*pdMAYU#pAjES#SOCzW=?oZWiUs{`SnCJ$q*Mv=L~-47wy;I%p)9O@-M*p} z04O_q14E3Vww9a~+F96wHb>aU*%g2WffST{TrI2|Q5Y^ul&!rBlzXMNk(HFyzSot|x$y#$ODRL?J$N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;E3WIjup8}QQ|GXG#;ZoOxr{b#2uU00>Iz%JlSOd=*sC^g0u;~20v&KmFtxEmpn zrDclPP{{n?zLgP`A?1# zz&`i?8gPH7%(1V4c8^%k-0Syrl2W){(i6|Kaw$TbKF=5hNp)#T;Q`MCdp&&jc>2Cx zt$x4>&qPNhb%glaAnCcM&*RnZ2Xr_E=A#bZ0uP)_#`Om~J!S7Cup1bum6q5!rDtbr zwI$XRQ7%_%1CknRwIx<+&A?$`Kd@kizP?m^V)9%Sd zt@YPj*I(alBiBD))b%5WhPAK}3ws^I`%OC4rgQzG8OqiFIKJSoXKQ8;4c&Y4bIpa1 zzW=k*`qMYxyma?u!{S96@4`dBnl*l4FyEx}+hV2U~9|$VEoFCx!NR@$+!-0WGpn-u! z0i9WoT^LF9E-Q!Pk{Pxx4HI5??)dPXWk%#|g#&s_Z_H+&{eI<=x$kE?ra9}bzn;7- z^V`Z6^Ud?Sk3K48`H_@1|M};i?SJd`zpnam_+i1esI~L*w%^`-gVXx~-v@)1f@%wy zd%CATd3nuy?wWq9mLn~#H1_)ZX{Vo_-j?g%5dXYwd1Lkg-v<&qj{H3N>Hkid6^+3O ij5W;L8g^UnXJ=UC)uhJ0)kBj32s~Z=T-G@yGywn^3(aT% diff --git a/assets/resources.qrc b/assets/resources.qrc index 4c16887..0e76303 100644 --- a/assets/resources.qrc +++ b/assets/resources.qrc @@ -5,33 +5,27 @@ ico_setting.png ico_info.png ico_bluetooth.png - connect.png cursor-hot.png power-hot.png settings-hot.png - circle.png - circle-hot.png - circle-pressed.png sleep-hot.png wifi-hot.png brightness-hot.png camera-hot.png day-hot.png night-hot.png - slider.png - bg_dashcam.png - bg_buttons.png record-hot.png stop-hot.png save-hot.png reboot-hot.png back-hot.png - bg_exit.png - kodi-hot.png - bg_rearcam.png rearcam-hot.png recordactive-hot.png lock-hot.png + volume-hot.png + bug-hot.png + eye-hot.png + skin-hot.png black.png Roboto-Regular.ttf diff --git a/assets/circle-hot.png b/assets/skin-hot.png old mode 100644 new mode 100755 similarity index 73% rename from assets/circle-hot.png rename to assets/skin-hot.png index 1eb77077d4034e613c5665f9204140c493765a4c..37b54b1ff975757741fe6c65053adb83614d70d7 GIT binary patch delta 962 zcmV;z13mok7xEmizY2c?ok>JNRCwC#noo#TRUF4ZzabqrL!x6FqaxIuC`e3DVJ0CZ zVg3XEg&Q}Dizr-(q=X=}5NaJ-izpJsRf29(P;jB5qafl!#Z<;k;vdGSe&06d#PQC1 z89;vqkO5=>89)Y*0b~G^ zQ(mh221&O0p_zRoX||aSN;(8wH?x+;Y~{M9gH?IBJMR9Kq<{6SoOkzuR>v%BepYck zpa-}J%m+>ZKLht9y=P`SLZ2SzQPxchc@?+M@g zBwf=;*_b@jcO*S*;zmc)K@kM6!V`F&Z^|BPnJtVj65_$AMchV3M?=6LG*$n={wDNqB$!YDl@G%xgOUGy9><0JbKn@sFY2 z5a%+j6FcA>+{V6Y11gYWMTsdjAvIPf-bwJhZe zQQLomU~?LJ<+>C^hJi()AX3)K$K!G03QNJiwJ05f*mJsk*%wN$dGbBn>vn@Yc6D{#r>_B|Vk&eQjTi#6m}Cw@bPl6#qxk zx)Sa)YohhR%Kjjcz6FkHtfVEt2fza}+h01?eJ1h}rRsl()L!!6Je*#H0l07*qoM6N<$f-7{?Z2$lO delta 315 zcmew)^Fe&Wey(~(X-^l&kcwMxZY$<7IZCuWEI)m1LDs-~*E^J=6 z{{YtyhI0(Lx8oSR)DD;%y#3g?pTRqU?G3}bQ^#yKysP|~z3jlUlKOp&dzc=(gx7~y z-Dh~l`TV{O6OS+xkMaRc#RHm5DK$JLf(p4T0uBs}WDqZm9j0!m7G-?Z!cfX$p~7O} z(y+dTVZPu4-W%##|C#r=Hz*r_V961la(~*ofhggFVdQ&MBb@0DMMv4*&oF diff --git a/assets/slider.png b/assets/slider.png deleted file mode 100644 index f989ba4768de428a4a7165e00ec245f2beac00b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3091 zcmcImcRUn+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%SCdVO6V1i*$YGL*Pygd6^yk0iFF$^QP~5;5z&yb;P>6@nvIn zCGolsaVxaBF3gj%#+R#3n%Qd(`N?%UHkzxUJ=44!>PPuR*`MQ@iMT6qOzLZ#43gNY zXtHj)xu>_OKZ%@)9o2O_nV#65e&pR6l(#!HZA_twjv6>g*-v6Yo=?h3>Wg8D*~q=D zqoJ{&d-r(ls0caWJ|LdUee(LGuacV!7I84TF-{uF9Lmqw$w+PSeOPe3-nzm2j@;GW zCGhccu(INfy{m_tZ9&sP{M&ElSge;G3O zVul8aqNAyO=F?n#xo=1<04ou92-cq#n#}l(7Lq|5PlfT4Fw4c{D!0!)^xqy*v9!+^ zb-V8DD%2EM_lsR0C{rw3SB!I}I&yZ?mzH}8Mk2~1E+87Pb#Ua8mwtrjq3T`7S8zUh&@ vRZ%(K4%+CjM)0qwW3){A=n548r>9h42*(l8HR$ut*axPDRtA*_=g0pBaU6Zj diff --git a/assets/kodi-hot.png b/assets/volume-hot.png similarity index 76% rename from assets/kodi-hot.png rename to assets/volume-hot.png index 38755be7a8e0a84ee85f89aae64f45b797f9074d..65a33cfecd69b1e8f0f049ba6d9bc2a2fa916e27 100644 GIT binary patch delta 830 zcmV-E1Ht^!8t)shzY2c?8c9S!RCwC#noDRDK@dRSW<^XyS4_me5eYG9{C_}2^dts? zpMx63i-PDu4+?@gV3#VB|dbuUT4??FB2C5j3ndXb1k{GpK;HSJ+*p%^wh zVRy|eGgUBjO;_(s&ztV*>Y9x?=ZLbD5OFa82EYIq00UqE41j+DFaQR?02lxRU;qq2 zV6qC>6U2>UMUWBN3!Deafa$>dsEmNszdp)ee9!U zzBlH0{i#4lhB<#2xFh-@U|vv8u+PWdpXc@KfjWr~?s;rGfC14Pg96~|UwoXJpWFnl ziM}4Vp=_UkHqo~O6T%V->s9F^uno8*=UY5Zv`tO5y0Cu$=##fuq3ZSlJ)$2~^{;@} zqAv{#fOo(O;3ZI_>f5DUBLPubx}}^Q76605XJ8VLR8!)vlyP8zYX4T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qN$o`dlwlS-fseZ>JpkESiH>DQbdUQ|JF~*}fSh~Eh9OfBO71?s>T;Fvj4ZpCooV8ky#x~4GF zh$TLD1WbhKkE9fU0#E=7KmjNK1)u;FfC5kem9!WC0|3`qeaw-^vW)-$002ovPDHLk FV1iedDXjni diff --git a/include/f1x/openauto/autoapp/Configuration/Configuration.hpp b/include/f1x/openauto/autoapp/Configuration/Configuration.hpp index aae2c01..953cbe1 100644 --- a/include/f1x/openauto/autoapp/Configuration/Configuration.hpp +++ b/include/f1x/openauto/autoapp/Configuration/Configuration.hpp @@ -46,6 +46,13 @@ public: void showClock(bool value) override; bool showClock() const override; + void showBigClock(bool value) override; + bool showBigClock() const override; + void oldGUI(bool value) override; + bool oldGUI() const override; + void setAlphaTrans(size_t value) override; + size_t getAlphaTrans() const override; + aasdk::proto::enums::VideoFPS::Enum getVideoFPS() const override; void setVideoFPS(aasdk::proto::enums::VideoFPS::Enum value) override; aasdk::proto::enums::VideoResolution::Enum getVideoResolution() const override; @@ -81,6 +88,11 @@ private: HandednessOfTrafficType handednessOfTrafficType_; bool showClock_; + + bool showBigClock_; + bool oldGUI_; + size_t alphaTrans_; + aasdk::proto::enums::VideoFPS::Enum videoFPS_; aasdk::proto::enums::VideoResolution::Enum videoResolution_; size_t screenDPI_; @@ -97,6 +109,11 @@ private: static const std::string cConfigFileName; static const std::string cGeneralShowClockKey; + + static const std::string cGeneralShowBigClockKey; + static const std::string cGeneralOldGUIKey; + static const std::string cGeneralAlphaTransKey; + static const std::string cGeneralHandednessOfTrafficTypeKey; static const std::string cVideoFPSKey; diff --git a/include/f1x/openauto/autoapp/Configuration/IConfiguration.hpp b/include/f1x/openauto/autoapp/Configuration/IConfiguration.hpp index b74a259..6148a3d 100644 --- a/include/f1x/openauto/autoapp/Configuration/IConfiguration.hpp +++ b/include/f1x/openauto/autoapp/Configuration/IConfiguration.hpp @@ -54,6 +54,12 @@ public: virtual HandednessOfTrafficType getHandednessOfTrafficType() const = 0; virtual void showClock(bool value) = 0; virtual bool showClock() const = 0; + virtual void showBigClock(bool value) = 0; + virtual bool showBigClock() const = 0; + virtual void oldGUI(bool value) = 0; + virtual bool oldGUI() const = 0; + virtual void setAlphaTrans(size_t value) = 0; + virtual size_t getAlphaTrans() const = 0; virtual aasdk::proto::enums::VideoFPS::Enum getVideoFPS() const = 0; virtual void setVideoFPS(aasdk::proto::enums::VideoFPS::Enum value) = 0; diff --git a/include/f1x/openauto/autoapp/UI/MainWindow.hpp b/include/f1x/openauto/autoapp/UI/MainWindow.hpp index 13c65b2..6bc5393 100644 --- a/include/f1x/openauto/autoapp/UI/MainWindow.hpp +++ b/include/f1x/openauto/autoapp/UI/MainWindow.hpp @@ -58,39 +58,86 @@ signals: void cameraRecord(); void openConnectDialog(); void showBrightnessSlider(); - void startKodi(); + void showVolumeSlider(); + void showAlphaSlider(); void showRearCam(); void hideRearCam(); private slots: void on_horizontalSliderBrightness_valueChanged(int value); + void on_horizontalSliderVolume_valueChanged(int value); + void on_horizontalSliderAlpha_valueChanged(int value); private slots: void on_pushButtonBrightness_clicked(); + void on_pushButtonBrightness2_clicked(); + void on_pushButtonVolume_clicked(); + void on_pushButtonVolume2_clicked(); + void on_pushButtonAlpha_clicked(); void switchGuiToDay(); void switchGuiToNight(); void showTime(); void cameraControlShow(); void cameraControlHide(); void toggleExit(); - void showRearCamBG(); - void hideRearCamBG(); void createDebuglog(); void setPairable(); + void toggleMuteButton(); + void toggleGUI(); + void setMute(); + void setUnMute(); + void customButtonPressed1(); + void customButtonPressed2(); + void customButtonPressed3(); + void customButtonPressed4(); + void customButtonPressed5(); + void customButtonPressed6(); + void customButtonPressed7(); + void customButtonPressed8(); private: Ui::MainWindow* ui_; - bool brightnessSliderVisible = false; QString brightnessFilename = "/sys/class/backlight/rpi_backlight/brightness"; QString brightnessFilenameAlt = "/tmp/custombrightness"; QFile *brightnessFile; QFile *brightnessFileAlt; char brightness_str[6]; + char volume_str[6]; + char alpha_str[6]; + QString bversion; + QString bdate; + + QString custom_button_file_c1 = "/boot/crankshaft/button_1"; + QString custom_button_file_c2 = "/boot/crankshaft/button_2"; + QString custom_button_file_c3 = "/boot/crankshaft/button_3"; + QString custom_button_file_c4 = "/boot/crankshaft/button_4"; + QString custom_button_file_c5 = "/boot/crankshaft/button_5"; + QString custom_button_file_c6 = "/boot/crankshaft/button_6"; + QString custom_button_file_c7 = "/boot/crankshaft/button_7"; + QString custom_button_file_c8 = "/boot/crankshaft/button_8"; + + QString custom_button_command_c1; + QString custom_button_command_c2; + QString custom_button_command_c3; + QString custom_button_command_c4; + QString custom_button_command_c5; + QString custom_button_command_c6; + QString custom_button_command_c7; + QString custom_button_command_c8; + + QString custom_button_color_c1 = "186,189,192"; + QString custom_button_color_c2 = "186,189,192"; + QString custom_button_color_c3 = "186,189,192"; + QString custom_button_color_c4 = "186,189,192"; + QString custom_button_color_c5 = "186,189,192"; + QString custom_button_color_c6 = "186,189,192"; + QString custom_button_color_c7 = "186,189,192"; + QString custom_button_color_c8 = "186,189,192"; + bool customBrightnessControl = false; bool wifiButtonForce = false; bool cameraButtonForce = false; - bool kodiButtonForce = false; bool brightnessButtonForce = false; bool nightModeEnabled = false; @@ -100,18 +147,35 @@ private: bool wallpaperDayFileExists = false; bool wallpaperNightFileExists = false; - bool wallpaperDevFileExists = false; - bool wallpaperDevNightFileExists = false; + bool wallpaperClassicDayFileExists = false; + bool wallpaperClassicNightFileExists = false; - bool masterButtonBGState = false; bool exitMenuVisible = false; bool rearCamEnabled = false; - bool dashcamBGState = false; - bool rearcamState = false; + bool rearCamVisible = false; bool dashCamRecording = false; bool systemDebugmode = false; + + bool bluetoothEnabled = false; + + bool toggleMute = false; + bool oldGUIStyle = false; + bool UseBigClock = false; + bool NoClock = false; + + bool c1ButtonForce = false; + bool c2ButtonForce = false; + bool c3ButtonForce = false; + bool c4ButtonForce = false; + bool c5ButtonForce = false; + bool c6ButtonForce = false; + bool c7ButtonForce = false; + bool c8ButtonForce = false; + + int screen_width = 800; + int screen_height = 480; }; } diff --git a/include/f1x/openauto/autoapp/UI/SettingsWindow.hpp b/include/f1x/openauto/autoapp/UI/SettingsWindow.hpp index 3e06ddd..81bc526 100644 --- a/include/f1x/openauto/autoapp/UI/SettingsWindow.hpp +++ b/include/f1x/openauto/autoapp/UI/SettingsWindow.hpp @@ -51,6 +51,7 @@ private slots: void onSave(); void onResetToDefaults(); void onUpdateScreenDPI(int value); + void onUpdateAlphaTrans(int value); void onShowBindings(); void onUpdateSystemVolume(int value); void onUpdateSystemCapture(int value); diff --git a/src/autoapp/Configuration/Configuration.cpp b/src/autoapp/Configuration/Configuration.cpp index d7976e9..f3167d0 100644 --- a/src/autoapp/Configuration/Configuration.cpp +++ b/src/autoapp/Configuration/Configuration.cpp @@ -32,6 +32,11 @@ namespace configuration const std::string Configuration::cConfigFileName = "openauto.ini"; const std::string Configuration::cGeneralShowClockKey = "General.ShowClock"; + +const std::string Configuration::cGeneralShowBigClockKey = "General.ShowBigClock"; +const std::string Configuration::cGeneralOldGUIKey = "General.OldGUI"; +const std::string Configuration::cGeneralAlphaTransKey = "General.AlphaTrans"; + const std::string Configuration::cGeneralHandednessOfTrafficTypeKey = "General.HandednessOfTrafficType"; const std::string Configuration::cVideoFPSKey = "Video.FPS"; @@ -83,6 +88,10 @@ void Configuration::load() static_cast(HandednessOfTrafficType::LEFT_HAND_DRIVE))); showClock_ = iniConfig.get(cGeneralShowClockKey, true); + showBigClock_ = iniConfig.get(cGeneralShowBigClockKey, false); + oldGUI_ = iniConfig.get(cGeneralOldGUIKey, false); + alphaTrans_ = iniConfig.get(cGeneralAlphaTransKey, 50); + videoFPS_ = static_cast(iniConfig.get(cVideoFPSKey, aasdk::proto::enums::VideoFPS::_60)); @@ -118,6 +127,9 @@ void Configuration::reset() { handednessOfTrafficType_ = HandednessOfTrafficType::LEFT_HAND_DRIVE; showClock_ = true; + showBigClock_ = false; + oldGUI_ = false; + alphaTrans_ = 50; videoFPS_ = aasdk::proto::enums::VideoFPS::_60; videoResolution_ = aasdk::proto::enums::VideoResolution::_480p; screenDPI_ = 140; @@ -136,7 +148,11 @@ void Configuration::save() { boost::property_tree::ptree iniConfig; iniConfig.put(cGeneralHandednessOfTrafficTypeKey, static_cast(handednessOfTrafficType_)); + iniConfig.put(cGeneralShowClockKey, showClock_); + iniConfig.put(cGeneralShowBigClockKey, showBigClock_); + iniConfig.put(cGeneralOldGUIKey, oldGUI_); + iniConfig.put(cGeneralAlphaTransKey, alphaTrans_); iniConfig.put(cVideoFPSKey, static_cast(videoFPS_)); iniConfig.put(cVideoResolutionKey, static_cast(videoResolution_)); @@ -196,6 +212,36 @@ bool Configuration::showClock() const return showClock_; } +void Configuration::showBigClock(bool value) +{ + showBigClock_ = value; +} + +bool Configuration::showBigClock() const +{ + return showBigClock_; +} + +void Configuration::oldGUI(bool value) +{ + oldGUI_ = value; +} + +bool Configuration::oldGUI() const +{ + return oldGUI_; +} + +size_t Configuration::getAlphaTrans() const +{ + return alphaTrans_; +} + +void Configuration::setAlphaTrans(size_t value) +{ + alphaTrans_ = value; +} + aasdk::proto::enums::VideoFPS::Enum Configuration::getVideoFPS() const { return videoFPS_; diff --git a/src/autoapp/UI/MainWindow.cpp b/src/autoapp/UI/MainWindow.cpp index 9500d42..d4630cc 100644 --- a/src/autoapp/UI/MainWindow.cpp +++ b/src/autoapp/UI/MainWindow.cpp @@ -27,6 +27,8 @@ #include #include #include +#include +#include #include #include #include @@ -44,16 +46,8 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi : QMainWindow(parent) , ui_(new Ui::MainWindow) { - this->setStyleSheet("QMainWindow {background-color: rgb(0,0,0);} \ - QPushButton { background: url(:/circle.png); border: 0; } \ - QPushButton:hover { background: url(:/circle.png); } \ - QPushButton:focus { background: url(:/circle.png); border: none; outline: none;} \ - QPushButton:pressed { background: url(:/circle-pressed.png); } \ - QSlider:horizontal { background: url(:/slider.png); border: 1px solid #ffffff; border-radius: 2px; min-height: 32px;} \ - QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} \ - QSlider::handle:horizontal { background: white; height: 52px; width: 52px; margin: 0 0;} \ - QLabel { color: #ffffff; font-weight: bold;} \ - "); + // set default bg color to black + this->setStyleSheet("QMainWindow {background-color: rgb(0,0,0);}"); // Set default font and size int id = QFontDatabase::addApplicationFont(":/Roboto-Regular.ttf"); @@ -61,24 +55,64 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi QFont _font(family, 11); qApp->setFont(_font); - // inits by files + // trigger files + QFileInfo nightModeFile("/tmp/night_mode_enabled"); + this->nightModeEnabled = nightModeFile.exists(); + + QFileInfo devModeFile("/tmp/dev_mode_enabled"); + this->devModeEnabled = devModeFile.exists(); + + QFileInfo bluetoothButtonFile("/tmp/button_bluetooth_visible"); + this->bluetoothEnabled = bluetoothButtonFile.exists(); + + QFileInfo wifiButtonFile("/etc/button_wifi_visible"); + this->wifiButtonForce = wifiButtonFile.exists(); + + QFileInfo cameraButtonFile("/etc/button_camera_visible"); + this->cameraButtonForce = cameraButtonFile.exists(); + + QFileInfo brightnessButtonFile("/etc/button_brightness_visible"); + this->brightnessButtonForce = brightnessButtonFile.exists(); + + QFileInfo DebugmodeFile("/tmp/usb_debug_mode"); + this->systemDebugmode = DebugmodeFile.exists(); + + QFileInfo c1ButtonFile(this->custom_button_file_c1); + this->c1ButtonForce = c1ButtonFile.exists(); + + QFileInfo c2ButtonFile(this->custom_button_file_c2); + this->c2ButtonForce = c2ButtonFile.exists(); + + QFileInfo c3ButtonFile(this->custom_button_file_c3); + this->c3ButtonForce = c3ButtonFile.exists(); + + QFileInfo c4ButtonFile(this->custom_button_file_c4); + this->c4ButtonForce = c4ButtonFile.exists(); + + QFileInfo c5ButtonFile(this->custom_button_file_c5); + this->c5ButtonForce = c5ButtonFile.exists(); + + QFileInfo c6ButtonFile(this->custom_button_file_c6); + this->c6ButtonForce = c6ButtonFile.exists(); + + QFileInfo c7ButtonFile(this->custom_button_file_c7); + this->c7ButtonForce = c7ButtonFile.exists(); + + QFileInfo c8ButtonFile(this->custom_button_file_c8); + this->c8ButtonForce = c8ButtonFile.exists(); + + // wallpaper stuff QFileInfo wallpaperDayFile("wallpaper.png"); this->wallpaperDayFileExists = wallpaperDayFile.exists(); QFileInfo wallpaperNightFile("wallpaper-night.png"); this->wallpaperNightFileExists = wallpaperNightFile.exists(); - QFileInfo wallpaperDevFile("wallpaper-devmode.png"); - this->wallpaperDevFileExists = wallpaperDevFile.exists(); + QFileInfo wallpaperClassicDayFile("wallpaper-classic.png"); + this->wallpaperDayFileExists = wallpaperDayFile.exists(); - QFileInfo wallpaperDevNightFile("wallpaper-devmode-night.png"); - this->wallpaperDevNightFileExists = wallpaperDevNightFile.exists(); - - QFileInfo nightModeFile("/tmp/night_mode_enabled"); - this->nightModeEnabled = nightModeFile.exists(); - - QFileInfo devModeFile("/tmp/dev_mode_enabled"); - this->devModeEnabled = devModeFile.exists(); + QFileInfo wallpaperClassicNightFile("wallpaper-classic-night.png"); + this->wallpaperNightFileExists = wallpaperNightFile.exists(); if (wallpaperDayFile.isSymLink()) { QFileInfo linkTarget(wallpaperDayFile.symLinkTarget()); @@ -90,48 +124,56 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi this->wallpaperNightFileExists = linkTarget.exists(); } - if (wallpaperDevFile.isSymLink()) { - QFileInfo linkTarget(wallpaperDevFile.symLinkTarget()); - this->wallpaperDevFileExists = linkTarget.exists(); + if (wallpaperClassicDayFile.isSymLink()) { + QFileInfo linkTarget(wallpaperClassicDayFile.symLinkTarget()); + this->wallpaperClassicDayFileExists = linkTarget.exists(); } - if (wallpaperDevNightFile.isSymLink()) { - QFileInfo linkTarget(wallpaperDevNightFile.symLinkTarget()); - this->wallpaperDevNightFileExists = linkTarget.exists(); + if (wallpaperClassicNightFile.isSymLink()) { + QFileInfo linkTarget(wallpaperClassicNightFile.symLinkTarget()); + this->wallpaperClassicNightFileExists = linkTarget.exists(); } ui_->setupUi(this); connect(ui_->pushButtonSettings, &QPushButton::clicked, this, &MainWindow::openSettings); - connect(ui_->pushButtonSettings, &QPushButton::clicked, this, &MainWindow::cameraHide); - connect(ui_->pushButtonSettings, &QPushButton::clicked, this, &MainWindow::cameraControlHide); + connect(ui_->pushButtonSettings2, &QPushButton::clicked, this, &MainWindow::openSettings); connect(ui_->pushButtonExit, &QPushButton::clicked, this, &MainWindow::toggleExit); - connect(ui_->pushButtonExit, &QPushButton::clicked, this, &MainWindow::cameraStop); - connect(ui_->pushButtonExit, &QPushButton::clicked, this, &MainWindow::cameraHide); - connect(ui_->pushButtonExit, &QPushButton::clicked, this, &MainWindow::cameraControlHide); + connect(ui_->pushButtonExit2, &QPushButton::clicked, this, &MainWindow::toggleExit); connect(ui_->pushButtonShutdown, &QPushButton::clicked, this, &MainWindow::exit); + connect(ui_->pushButtonShutdown2, &QPushButton::clicked, this, &MainWindow::exit); connect(ui_->pushButtonReboot, &QPushButton::clicked, this, &MainWindow::reboot); + connect(ui_->pushButtonReboot2, &QPushButton::clicked, this, &MainWindow::reboot); connect(ui_->pushButtonCancel, &QPushButton::clicked, this, &MainWindow::toggleExit); - connect(ui_->pushButtonToggleCursor, &QPushButton::clicked, this, &MainWindow::toggleCursor); + connect(ui_->pushButtonCancel2, &QPushButton::clicked, this, &MainWindow::toggleExit); connect(ui_->pushButtonDay, &QPushButton::clicked, this, &MainWindow::TriggerScriptDay); connect(ui_->pushButtonDay, &QPushButton::clicked, this, &MainWindow::switchGuiToDay); + connect(ui_->pushButtonDay2, &QPushButton::clicked, this, &MainWindow::TriggerScriptDay); + connect(ui_->pushButtonDay2, &QPushButton::clicked, this, &MainWindow::switchGuiToDay); connect(ui_->pushButtonNight, &QPushButton::clicked, this, &MainWindow::TriggerScriptNight); connect(ui_->pushButtonNight, &QPushButton::clicked, this, &MainWindow::switchGuiToNight); - connect(ui_->pushButtonWirelessConnection, &QPushButton::clicked, this, &MainWindow::openConnectDialog); - connect(ui_->pushButtonKodi, &QPushButton::clicked, this, &MainWindow::startKodi); + connect(ui_->pushButtonNight2, &QPushButton::clicked, this, &MainWindow::TriggerScriptNight); + connect(ui_->pushButtonNight2, &QPushButton::clicked, this, &MainWindow::switchGuiToNight); connect(ui_->pushButtonBrightness, &QPushButton::clicked, this, &MainWindow::showBrightnessSlider); - connect(ui_->systemDebugging, &QPushButton::clicked, this, &MainWindow::createDebuglog); + connect(ui_->pushButtonBrightness2, &QPushButton::clicked, this, &MainWindow::showBrightnessSlider); + connect(ui_->pushButtonVolume, &QPushButton::clicked, this, &MainWindow::showVolumeSlider); + connect(ui_->pushButtonVolume2, &QPushButton::clicked, this, &MainWindow::showVolumeSlider); + connect(ui_->pushButtonAlpha, &QPushButton::clicked, this, &MainWindow::showAlphaSlider); + connect(ui_->pushButtonDebug, &QPushButton::clicked, this, &MainWindow::createDebuglog); + connect(ui_->pushButtonDebug2, &QPushButton::clicked, this, &MainWindow::createDebuglog); connect(ui_->pushButtonBluetooth, &QPushButton::clicked, this, &MainWindow::setPairable); + connect(ui_->pushButtonMute, &QPushButton::clicked, this, &MainWindow::toggleMuteButton); + connect(ui_->pushButtonMute, &QPushButton::clicked, this, &MainWindow::setMute); + connect(ui_->pushButtonUnMute, &QPushButton::clicked, this, &MainWindow::toggleMuteButton); + connect(ui_->pushButtonUnMute, &QPushButton::clicked, this, &MainWindow::setUnMute); + connect(ui_->pushButtonToggleGUI, &QPushButton::clicked, this, &MainWindow::toggleGUI); + connect(ui_->pushButtonToggleGUI2, &QPushButton::clicked, this, &MainWindow::toggleGUI); QTimer *timer=new QTimer(this); connect(timer, SIGNAL(timeout()),this,SLOT(showTime())); timer->start(); - QFileInfo bluetoothButtonFile("/tmp/button_bluetooth_visible"); - if (! bluetoothButtonFile.exists()) { - ui_->pushButtonBluetooth->hide(); - } - - // Get version string + // Build Version string for mainscreen + // Get git version string QFileInfo vFile("/etc/crankshaft.build"); if (vFile.exists()) { QFile versionFile(QString("/etc/crankshaft.build")); @@ -139,9 +181,9 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi QTextStream data_version(&versionFile); QString lineversion = data_version.readAll(); versionFile.close(); - ui_->versionString->setText(lineversion); + this->bversion=lineversion.simplified(); } else { - ui_->versionString->setText(""); + this->bversion="unknown"; } // Get date string @@ -152,152 +194,365 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi QTextStream data_date(&dateFile); QString linedate = data_date.readAll(); dateFile.close(); - ui_->dateString->setText(linedate); + this->bdate=linedate.simplified(); } else { - ui_->dateString->setText(""); + this->bdate="- - -"; } - QFileInfo cursorButtonFile("/etc/button_cursor_visible"); - bool cursorButtonForce = cursorButtonFile.exists(); - - QFileInfo wifiButtonFile("/etc/button_wifi_visible"); - this->wifiButtonForce = wifiButtonFile.exists(); - - QFileInfo cameraButtonFile("/etc/button_camera_visible"); - this->cameraButtonForce = cameraButtonFile.exists(); + QString buildid = "Build: " + this->bversion + " (" + this->bdate + ")"; + ui_->BuildID->setText(buildid); + // enable connects while cam is enabled if (this->cameraButtonForce) { connect(ui_->pushButtonCameraShow, &QPushButton::clicked, this, &MainWindow::cameraShow); connect(ui_->pushButtonCameraShow, &QPushButton::clicked, this, &MainWindow::cameraControlShow); + connect(ui_->pushButtonCameraShow2, &QPushButton::clicked, this, &MainWindow::cameraShow); + connect(ui_->pushButtonCameraShow2, &QPushButton::clicked, this, &MainWindow::cameraControlShow); connect(ui_->pushButtonCameraHide, &QPushButton::clicked, this, &MainWindow::cameraHide); connect(ui_->pushButtonCameraHide, &QPushButton::clicked, this, &MainWindow::cameraControlHide); connect(ui_->pushButtonStop, &QPushButton::clicked, this, &MainWindow::cameraStop); connect(ui_->pushButtonRecord, &QPushButton::clicked, this, &MainWindow::cameraRecord); - connect(ui_->pushButtonRearcam, &QPushButton::clicked, this, &MainWindow::showRearCamBG); - connect(ui_->pushButtonRearcam, &QPushButton::clicked, this, &MainWindow::showRearCam); - connect(ui_->pushButtonRearcamBack, &QPushButton::clicked, this, &MainWindow::hideRearCamBG); - connect(ui_->pushButtonRearcamBack, &QPushButton::clicked, this, &MainWindow::hideRearCam); - connect(ui_->pushButtonRearcamBack, &QPushButton::clicked, this, &MainWindow::cameraControlHide); connect(ui_->pushButtonSave, &QPushButton::clicked, this, &MainWindow::cameraSave); - ui_->pushButtonCameraShow->show(); - ui_->pushButtonCameraHide->hide(); + ui_->pushButtonDummyCam->hide(); + ui_->pushButtonDummyCam2->hide(); } else { ui_->pushButtonCameraShow->hide(); - ui_->pushButtonCameraHide->hide(); - + ui_->pushButtonCameraShow2->hide(); + ui_->pushButtonDummyCam->show(); + ui_->pushButtonDummyCam2->show(); } - QFileInfo brightnessButtonFile("/etc/button_brightness_visible"); - this->brightnessButtonForce = brightnessButtonFile.exists(); - - QFileInfo kodiInstalledFile("/usr/bin/kodi"); - this->kodiButtonForce = kodiInstalledFile.exists(); - - if (configuration->hasTouchScreen() && !cursorButtonForce) { - ui_->pushButtonToggleCursor->hide(); + // show debug button if enabled + if (!this->systemDebugmode) { + ui_->pushButtonDebug->hide(); + ui_->pushButtonDebug2->hide(); + } else { + ui_->pushButtonDummyDebug->hide(); } - QPixmap image; - image.load(":/bg_buttons.png"); - ui_->masterButtonBG->setPixmap(image); - ui_->pushButtonStop->hide(); - ui_->pushButtonRecord->hide(); - ui_->pushButtonRecordActive->hide(); - ui_->pushButtonSave->hide(); - ui_->pushButtonRearcam->hide(); - ui_->pushButtonRearcamBack->hide(); ui_->systemConfigInProgress->hide(); - ui_->systemDebugging->hide(); ui_->pushButtonLock->hide(); + ui_->pushButtonLock2->hide(); ui_->btDevice->hide(); - QFileInfo DebugmodeFile("/tmp/usb_debug_mode"); - if (DebugmodeFile.exists()) { - ui_->systemDebugging->show(); - this->systemDebugmode = true; - } - - if (!this->wifiButtonForce) { - ui_->pushButtonWirelessConnection->hide(); - } - + // hide brightness slider of control file is not existing QFileInfo brightnessFile(brightnessFilename); - if (!brightnessFile.exists() && !this->brightnessButtonForce) { ui_->pushButtonBrightness->hide(); } - - ui_->kodiBG->hide(); - if (!this->kodiButtonForce) { - ui_->pushButtonKodi->hide(); - } else { - system("/usr/local/bin/autoapp_helper startkodimonitor &"); + // hide dummy if debug is shown + if (this->systemDebugmode) { + ui_->pushButtonDummy->hide(); } + // as default hide brightness slider ui_->horizontalSliderBrightness->hide(); - ui_->horizontalSliderLabel->hide(); + ui_->brightnessValueLabel->hide(); - if (!configuration->showClock()) { - ui_->Digital_clock->hide(); + // as default hide alpha slider and button + ui_->horizontalSliderAlpha->hide(); + ui_->alphaValueLabel->hide(); + ui_->pushButtonAlpha->show(); + + + // hide bluetooth if not enabled + if (!this->bluetoothEnabled) { + ui_->pushButtonBluetooth->hide(); } + // as default hide power buttons ui_->pushButtonShutdown->hide(); ui_->pushButtonReboot->hide(); ui_->pushButtonCancel->hide(); + ui_->exitWidget->hide(); + // as default hide phone connected label ui_->phoneConnected->hide(); - // init bg's on startup - if (!this->nightModeEnabled) { - if (this->devModeEnabled) { - if (this->wallpaperDevFileExists) { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper-devmode.png) }") ); - } else { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(:/connect.png) }") ); - } + // as default hide muted button + ui_->pushButtonUnMute->hide(); + + // set custom buttons if file enabled by trigger file + if (!this->c1ButtonForce) { + ui_->pushButton_c1->hide(); + } else { + // read button config 1 + QFile paramFile(this->custom_button_file_c1); + paramFile.open(QIODevice::ReadOnly); + QTextStream data(¶mFile); + QStringList params = data.readAll().split("#"); + paramFile.close(); + ui_->pushButton_c1->setText(params[0].simplified()); + this->custom_button_command_c1 = params[1].simplified(); + if (params[2] != "") { + this->custom_button_color_c1 = params[2].simplified(); + } + connect(ui_->pushButton_c1, &QPushButton::clicked, this, &MainWindow::customButtonPressed1); + } + + if (!this->c2ButtonForce) { + ui_->pushButton_c2->hide(); + } else { + // read button config 2 + QFile paramFile(this->custom_button_file_c2); + paramFile.open(QIODevice::ReadOnly); + QTextStream data(¶mFile); + QStringList params = data.readAll().split("#"); + paramFile.close(); + ui_->pushButton_c2->setText(params[0].simplified()); + this->custom_button_command_c2 = params[1].simplified(); + if (params[2] != "") { + this->custom_button_color_c2 = params[2].simplified(); + } + connect(ui_->pushButton_c2, &QPushButton::clicked, this, &MainWindow::customButtonPressed2); + } + + if (!this->c3ButtonForce) { + ui_->pushButton_c3->hide(); + } else { + // read button config 3 + QFile paramFile(this->custom_button_file_c3); + paramFile.open(QIODevice::ReadOnly); + QTextStream data(¶mFile); + QStringList params = data.readAll().split("#"); + paramFile.close(); + ui_->pushButton_c3->setText(params[0].simplified()); + this->custom_button_command_c3 = params[1].simplified(); + if (params[2] != "") { + this->custom_button_color_c3 = params[2].simplified(); + } + connect(ui_->pushButton_c3, &QPushButton::clicked, this, &MainWindow::customButtonPressed3); + } + + if (!this->c4ButtonForce) { + ui_->pushButton_c4->hide(); + } else { + // read button config 4 + QFile paramFile(this->custom_button_file_c4); + paramFile.open(QIODevice::ReadOnly); + QTextStream data(¶mFile); + QStringList params = data.readAll().split("#"); + paramFile.close(); + ui_->pushButton_c4->setText(params[0].simplified()); + this->custom_button_command_c4 = params[1].simplified(); + if (params[2] != "") { + this->custom_button_color_c4 = params[2].simplified(); + } + connect(ui_->pushButton_c4, &QPushButton::clicked, this, &MainWindow::customButtonPressed4); + } + + if (!this->c5ButtonForce) { + ui_->pushButton_c5->hide(); + } else { + // read button config 5 + QFile paramFile(this->custom_button_file_c5); + paramFile.open(QIODevice::ReadOnly); + QTextStream data(¶mFile); + QStringList params = data.readAll().split("#"); + paramFile.close(); + ui_->pushButton_c5->setText(params[0].simplified()); + this->custom_button_command_c5 = params[1].simplified(); + if (params[2] != "") { + this->custom_button_color_c5 = params[2].simplified(); + } + connect(ui_->pushButton_c5, &QPushButton::clicked, this, &MainWindow::customButtonPressed5); + } + + if (!this->c6ButtonForce) { + ui_->pushButton_c6->hide(); + } else { + // read button config 6 + QFile paramFile(this->custom_button_file_c6); + paramFile.open(QIODevice::ReadOnly); + QTextStream data(¶mFile); + QStringList params = data.readAll().split("#"); + paramFile.close(); + ui_->pushButton_c6->setText(params[0].simplified()); + this->custom_button_command_c6 = params[1].simplified(); + if (params[2] != "") { + this->custom_button_color_c6 = params[2].simplified(); + } + connect(ui_->pushButton_c6, &QPushButton::clicked, this, &MainWindow::customButtonPressed6); + } + + if (!this->c7ButtonForce) { + ui_->pushButton_c7->hide(); + } else { + // read button config 7 + QFile paramFile(this->custom_button_file_c7); + paramFile.open(QIODevice::ReadOnly); + QTextStream data(¶mFile); + QStringList params = data.readAll().split("#"); + paramFile.close(); + ui_->pushButton_c7->setText(params[0].simplified()); + this->custom_button_command_c7 = params[1].simplified(); + if (params[2] != "") { + this->custom_button_color_c7 = params[2].simplified(); + } + connect(ui_->pushButton_c7, &QPushButton::clicked, this, &MainWindow::customButtonPressed7); + } + + if (!this->c8ButtonForce) { + ui_->pushButton_c8->hide(); + } else { + // read button config 8 + QFile paramFile(this->custom_button_file_c8); + paramFile.open(QIODevice::ReadOnly); + QTextStream data(¶mFile); + QStringList params = data.readAll().split("#"); + paramFile.close(); + ui_->pushButton_c8->setText(params[0].simplified()); + this->custom_button_command_c8 = params[1].simplified(); + if (params[2] != "") { + this->custom_button_color_c8 = params[2].simplified(); + } + connect(ui_->pushButton_c8, &QPushButton::clicked, this, &MainWindow::customButtonPressed8); + } + + // as default hide camera controls + ui_->cameraWidget->hide(); + ui_->pushButtonRecordActive->hide(); + + // fill gui with dummys if needed + if (this->c1ButtonForce || this->c2ButtonForce || this->c3ButtonForce || this->c4ButtonForce || this->c5ButtonForce || this->c6ButtonForce) { + if (!this->c1ButtonForce && !this->c2ButtonForce) { + ui_->pushButtonDummy1->show(); } else { - if (this->wallpaperDayFileExists) { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper.png) }") ); - } else { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(:/connect.png) }") ); - } + ui_->pushButtonDummy1->hide(); + } + if (!this->c3ButtonForce && !this->c4ButtonForce) { + ui_->pushButtonDummy2->show(); + } else { + ui_->pushButtonDummy2->hide(); + } + if (!this->c5ButtonForce && !this->c6ButtonForce) { + ui_->pushButtonDummy3->show(); + } else { + ui_->pushButtonDummy3->hide(); } } else { - if (this->devModeEnabled) { - if (this->wallpaperDevNightFileExists) { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper-devmode-night.png) }") ); - } else { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(:/connect.png) }") ); - } - } else { - if (this->wallpaperNightFileExists) { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper-night.png) }") ); - } else { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(:/connect.png) }") ); - } - } + ui_->pushButtonDummy1->hide(); + ui_->pushButtonDummy2->hide(); + ui_->pushButtonDummy3->hide(); + } + + if (this->c8ButtonForce || this->systemDebugmode) { + ui_->pushButtonDummy->hide(); + } + // show dev labels if dev mode activated + if (!this->devModeEnabled) { + ui_->devlabel_left->hide(); + ui_->devlabel_right->hide(); } - system("/usr/local/bin/autoapp_helper restorevolumes"); // Load configured brightness values system("/usr/local/bin/autoapp_helper getbrightnessvalues"); - // read and set brightness values + // read brightness slider attribs QFile paramFile(QString("/tmp/br_values")); paramFile.open(QIODevice::ReadOnly); QTextStream data_param(¶mFile); QStringList getparams = data_param.readAll().split("#"); paramFile.close(); + // set brightness slider attribs ui_->horizontalSliderBrightness->setMinimum(getparams[0].toInt()); ui_->horizontalSliderBrightness->setMaximum(getparams[1].toInt()); ui_->horizontalSliderBrightness->setSingleStep(getparams[2].toInt()); ui_->horizontalSliderBrightness->setTickInterval(getparams[2].toInt()); + + // run monitor for custom brightness command if enabled in crankshaft_env.sh if (getparams[3] == "1") { ui_->pushButtonBrightness->show(); this->customBrightnessControl = true; system("/usr/local/bin/autoapp_helper startcustombrightness &"); } + + // read param file + QFileInfo audioparamFile("/boot/crankshaft/volume"); + if (audioparamFile.exists()) { + QFile audioparamFile(QString("/boot/crankshaft/volume")); + audioparamFile.open(QIODevice::ReadOnly); + QTextStream data_param(&audioparamFile); + QString getparams = data_param.readAll(); + audioparamFile.close(); + // init volume + QString vol=QString::number(getparams.toInt()); + ui_->volumeValueLabel->setText(vol+"%"); + ui_->horizontalSliderVolume->setValue(vol.toInt()); + } + + // switch to old menu if set in settings + if (!configuration->oldGUI()) { + this->oldGUIStyle = false; + ui_->menuWidget->show(); + ui_->oldmenuWidget->hide(); + } else { + this->oldGUIStyle = true; + ui_->oldmenuWidget->show(); + ui_->menuWidget->hide(); + } + + // set bg's on startup + if (!this->nightModeEnabled) { + if (this->oldGUIStyle) { + if (this->wallpaperClassicDayFileExists) { + this->setStyleSheet("QMainWindow { background: url(wallpaper-classic.png); background-repeat: no-repeat; background-position: center; }"); + } + } else { + if (this->wallpaperDayFileExists) { + this->setStyleSheet("QMainWindow { background: url(wallpaper.png); background-repeat: no-repeat; background-position: center; }"); + } + } + ui_->pushButtonDay->hide(); + ui_->pushButtonDay2->hide(); + ui_->pushButtonNight->show(); + ui_->pushButtonNight2->show(); + } else { + if (this->oldGUIStyle) { + if (this->wallpaperClassicNightFileExists) { + this->setStyleSheet("QMainWindow { background: url(wallpaper-classic-night.png); background-repeat: no-repeat; background-position: center; }"); + } + } else { + if (this->wallpaperNightFileExists) { + this->setStyleSheet("QMainWindow { background: url(wallpaper-night.png); background-repeat: no-repeat; background-position: center; }"); + } + } + ui_->pushButtonNight->hide(); + ui_->pushButtonNight2->hide(); + ui_->pushButtonDay->show(); + ui_->pushButtonDay2->show(); + } + + // use big clock in classic gui? + if (configuration->showBigClock()) { + this->UseBigClock = true; + } else { + this->UseBigClock = false; + } + + // clock viibility by settings + if (!configuration->showClock()) { + ui_->Digital_clock->hide(); + ui_->bigClock->hide(); + this->NoClock = true; + } else { + this->NoClock = false; + if (this->UseBigClock) { + ui_->oldmenuDummy->hide(); + ui_->bigClock->show(); + if (oldGUIStyle) { + ui_->Digital_clock->hide(); + } + } else { + ui_->Digital_clock->show(); + ui_->bigClock->hide(); + } + } + + // init alpha values + ui_->horizontalSliderAlpha->setValue(int(configuration->getAlphaTrans())); + MainWindow::on_horizontalSliderAlpha_valueChanged(int(configuration->getAlphaTrans())); } MainWindow::~MainWindow() @@ -310,48 +565,165 @@ MainWindow::~MainWindow() } } +void f1x::openauto::autoapp::ui::MainWindow::customButtonPressed1() +{ + system(qPrintable(this->custom_button_command_c1 + " &")); +} + +void f1x::openauto::autoapp::ui::MainWindow::customButtonPressed2() +{ + system(qPrintable(this->custom_button_command_c2 + " &")); +} + +void f1x::openauto::autoapp::ui::MainWindow::customButtonPressed3() +{ + system(qPrintable(this->custom_button_command_c3 + " &")); +} + +void f1x::openauto::autoapp::ui::MainWindow::customButtonPressed4() +{ + system(qPrintable(this->custom_button_command_c4 + " &")); +} + +void f1x::openauto::autoapp::ui::MainWindow::customButtonPressed5() +{ + system(qPrintable(this->custom_button_command_c5 + " &")); +} + +void f1x::openauto::autoapp::ui::MainWindow::customButtonPressed6() +{ + system(qPrintable(this->custom_button_command_c6 + " &")); +} + +void f1x::openauto::autoapp::ui::MainWindow::customButtonPressed7() +{ + system(qPrintable(this->custom_button_command_c7 + " &")); +} + +void f1x::openauto::autoapp::ui::MainWindow::customButtonPressed8() +{ + system(qPrintable(this->custom_button_command_c8 + " &")); +} + void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonBrightness_clicked() { - this->brightnessFile = new QFile(this->brightnessFilename); this->brightnessFileAlt = new QFile(this->brightnessFilenameAlt); - this->brightnessSliderVisible = !this->brightnessSliderVisible; - if (this->brightnessSliderVisible) { - if (this->cameraButtonForce) { - f1x::openauto::autoapp::ui::MainWindow::cameraControlHide(); - f1x::openauto::autoapp::ui::MainWindow::cameraHide(); + // Get the current brightness value + if (!this->customBrightnessControl) { + if (this->brightnessFile->open(QIODevice::ReadOnly)) { + QByteArray data = this->brightnessFile->readAll(); + std::string::size_type sz; + int brightness_val = std::stoi(data.toStdString(), &sz); + ui_->horizontalSliderBrightness->setValue(brightness_val); + QString bri=QString::number(brightness_val); + ui_->brightnessValueLabel->setText(bri); + this->brightnessFile->close(); } - // Get the current brightness value - if (!this->customBrightnessControl) { - if (this->brightnessFile->open(QIODevice::ReadOnly)) { - QByteArray data = this->brightnessFile->readAll(); - std::string::size_type sz; - int brightness_val = std::stoi(data.toStdString(), &sz); - ui_->horizontalSliderBrightness->setValue(brightness_val); - this->brightnessFile->close(); - } - } else { - if (this->brightnessFileAlt->open(QIODevice::ReadOnly)) { - QByteArray data = this->brightnessFileAlt->readAll(); - std::string::size_type sz; - int brightness_val = std::stoi(data.toStdString(), &sz); - ui_->horizontalSliderBrightness->setValue(brightness_val); - this->brightnessFileAlt->close(); - } - } - ui_->horizontalSliderBrightness->show(); - ui_->horizontalSliderLabel->show(); } else { - ui_->horizontalSliderLabel->hide(); - ui_->horizontalSliderBrightness->hide(); + if (this->brightnessFileAlt->open(QIODevice::ReadOnly)) { + QByteArray data = this->brightnessFileAlt->readAll(); + std::string::size_type sz; + int brightness_val = std::stoi(data.toStdString(), &sz); + ui_->horizontalSliderBrightness->setValue(brightness_val); + QString bri=QString::number(brightness_val); + ui_->brightnessValueLabel->setText(bri); + this->brightnessFileAlt->close(); + } } + ui_->horizontalSliderBrightness->show(); + ui_->brightnessValueLabel->show(); + ui_->horizontalSliderVolume->hide(); + ui_->volumeValueLabel->hide(); + ui_->pushButtonMute->hide(); + ui_->pushButtonUnMute->hide(); + ui_->horizontalSliderAlpha->hide(); + ui_->alphaValueLabel->hide(); +} + +void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonBrightness2_clicked() +{ + this->brightnessFile = new QFile(this->brightnessFilename); + this->brightnessFileAlt = new QFile(this->brightnessFilenameAlt); + + // Get the current brightness value + if (!this->customBrightnessControl) { + if (this->brightnessFile->open(QIODevice::ReadOnly)) { + QByteArray data = this->brightnessFile->readAll(); + std::string::size_type sz; + int brightness_val = std::stoi(data.toStdString(), &sz); + ui_->horizontalSliderBrightness->setValue(brightness_val); + QString bri=QString::number(brightness_val); + ui_->brightnessValueLabel->setText(bri); + this->brightnessFile->close(); + } + } else { + if (this->brightnessFileAlt->open(QIODevice::ReadOnly)) { + QByteArray data = this->brightnessFileAlt->readAll(); + std::string::size_type sz; + int brightness_val = std::stoi(data.toStdString(), &sz); + ui_->horizontalSliderBrightness->setValue(brightness_val); + QString bri=QString::number(brightness_val); + ui_->brightnessValueLabel->setText(bri); + this->brightnessFileAlt->close(); + } + } + ui_->horizontalSliderBrightness->show(); + ui_->brightnessValueLabel->show(); + ui_->horizontalSliderVolume->hide(); + ui_->volumeValueLabel->hide(); + ui_->pushButtonMute->hide(); + ui_->pushButtonUnMute->hide(); + ui_->horizontalSliderAlpha->hide(); + ui_->alphaValueLabel->hide(); +} + +void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonVolume_clicked() +{ + ui_->horizontalSliderVolume->show(); + ui_->volumeValueLabel->show(); + if (this->toggleMute) { + ui_->pushButtonUnMute->show(); + } else { + ui_->pushButtonMute->show(); + } + ui_->horizontalSliderBrightness->hide(); + ui_->brightnessValueLabel->hide(); + ui_->horizontalSliderAlpha->hide(); + ui_->alphaValueLabel->hide(); +} + +void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonVolume2_clicked() +{ + ui_->horizontalSliderVolume->show(); + ui_->volumeValueLabel->show(); + if (this->toggleMute) { + ui_->pushButtonUnMute->show(); + } else { + ui_->pushButtonMute->show(); + } + ui_->horizontalSliderBrightness->hide(); + ui_->brightnessValueLabel->hide(); + ui_->horizontalSliderAlpha->hide(); + ui_->alphaValueLabel->hide(); +} + +void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonAlpha_clicked() +{ + ui_->horizontalSliderAlpha->show(); + ui_->alphaValueLabel->show(); + ui_->horizontalSliderVolume->hide(); + ui_->volumeValueLabel->hide(); + ui_->pushButtonMute->hide(); + ui_->pushButtonUnMute->hide(); + ui_->horizontalSliderBrightness->hide(); + ui_->brightnessValueLabel->hide(); } void f1x::openauto::autoapp::ui::MainWindow::on_horizontalSliderBrightness_valueChanged(int value) { int n = snprintf(this->brightness_str, 5, "%d", value); - this->brightnessFile = new QFile(this->brightnessFilename); this->brightnessFileAlt = new QFile(this->brightnessFilenameAlt); @@ -370,133 +742,201 @@ void f1x::openauto::autoapp::ui::MainWindow::on_horizontalSliderBrightness_value this->brightnessFileAlt->close(); } } - ui_->horizontalSliderLabel->setText(this->brightness_str); + QString bri=QString::number(value); + ui_->brightnessValueLabel->setText(bri); +} + +void f1x::openauto::autoapp::ui::MainWindow::on_horizontalSliderVolume_valueChanged(int value) +{ + int n = snprintf(this->volume_str, 5, "%d", value); + QString vol=QString::number(value); + ui_->volumeValueLabel->setText(vol+"%"); + system(("/usr/local/bin/autoapp_helper setvolume " + std::to_string(value) + "&").c_str()); +} + +void f1x::openauto::autoapp::ui::MainWindow::on_horizontalSliderAlpha_valueChanged(int value) +{ + int n = snprintf(this->alpha_str, 5, "%d", value); + double alpha = value/100.0; + QString alp=QString::number(alpha); + ui_->alphaValueLabel->setText(alp); + ui_->pushButtonAlpha->setStyleSheet( "background-color: rgba(243, 243, 243, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonExit->setStyleSheet( "background-color: rgba(164, 0, 0, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonShutdown->setStyleSheet( "background-color: rgba(239, 41, 41, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonReboot->setStyleSheet( "background-color: rgba(252, 175, 62, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonCancel->setStyleSheet( "background-color: rgba(32, 74, 135, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonBrightness->setStyleSheet( "background-color: rgba(245, 121, 0, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonVolume->setStyleSheet( "background-color: rgba(64, 191, 191, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonAlpha->setStyleSheet( "background-color: rgba(173, 127, 168, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonLock->setStyleSheet( "background-color: rgba(15, 54, 5, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonSettings->setStyleSheet( "background-color: rgba(138, 226, 52, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonDay->setStyleSheet( "background: rgba(252, 233, 79, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonNight->setStyleSheet( "background-color: rgba(114, 159, 207, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonCameraShow->setStyleSheet( "background-color: rgba(100, 62, 4, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonDummyCam->setStyleSheet( "background-color: rgba(117, 80, 123, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonToggleGUI->setStyleSheet( "background-color: rgba(237, 164, 255, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButton_c1->setStyleSheet( "background-color: rgba(" + this->custom_button_color_c1 + ", " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5); color: rgb(255,255,255);"); + ui_->pushButton_c2->setStyleSheet( "background-color: rgba(" + this->custom_button_color_c2 + ", " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5); color: rgb(255,255,255);"); + ui_->pushButton_c3->setStyleSheet( "background-color: rgba(" + this->custom_button_color_c3 + ", " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5); color: rgb(255,255,255);"); + ui_->pushButton_c4->setStyleSheet( "background-color: rgba(" + this->custom_button_color_c4 + ", " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5); color: rgb(255,255,255);"); + ui_->pushButton_c5->setStyleSheet( "background-color: rgba(" + this->custom_button_color_c5 + ", " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5); color: rgb(255,255,255);"); + ui_->pushButton_c6->setStyleSheet( "background-color: rgba(" + this->custom_button_color_c6 + ", " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5); color: rgb(255,255,255);"); + ui_->pushButton_c7->setStyleSheet( "background-color: rgba(" + this->custom_button_color_c7 + ", " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5); color: rgb(255,255,255);"); + ui_->pushButton_c8->setStyleSheet( "background-color: rgba(" + this->custom_button_color_c8 + ", " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5); color: rgb(255,255,255);"); + ui_->pushButtonDummy->setStyleSheet( "background-color: rgba(52, 101, 164, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonDummy1->setStyleSheet( "background-color: rgba(186, 189, 182, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonDummy2->setStyleSheet( "background-color: rgba(186, 189, 182, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonDummy3->setStyleSheet( "background-color: rgba(186, 189, 182, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); + ui_->pushButtonDebug->setStyleSheet( "background-color: rgba(85, 87, 83, " + alp + " ); border-radius: 4px; border: 2px solid rgba(255,255,255,0.5);"); } void f1x::openauto::autoapp::ui::MainWindow::switchGuiToNight() { - if (this->devModeEnabled) { - if (this->wallpaperDevNightFileExists) { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper-devmode-night.png) }") ); + MainWindow::on_pushButtonVolume_clicked(); + if (this->oldGUIStyle) { + if (this->wallpaperClassicNightFileExists) { + this->setStyleSheet("QMainWindow { background: url(wallpaper-classic-night.png); background-repeat: no-repeat; background-position: center; }"); } else { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(:/connect.png) }") ); + this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }"); } } else { if (this->wallpaperNightFileExists) { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper-night.png) }") ); + this->setStyleSheet("QMainWindow { background: url(wallpaper-night.png); background-repeat: no-repeat; background-position: center; }"); } else { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(:/connect.png) }") ); + this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }"); } } ui_->pushButtonDay->show(); + ui_->pushButtonDay2->show(); ui_->pushButtonNight->hide(); - if (this->brightnessSliderVisible) { - ui_->horizontalSliderBrightness->hide(); - ui_->horizontalSliderLabel->hide(); - this->brightnessSliderVisible = false; - } + ui_->pushButtonNight2->hide(); } void f1x::openauto::autoapp::ui::MainWindow::switchGuiToDay() { - if (this->devModeEnabled) { - if (this->wallpaperDevFileExists) { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper-devmode.png) }") ); + MainWindow::on_pushButtonVolume_clicked(); + if (this->oldGUIStyle) { + if (this->wallpaperClassicDayFileExists) { + this->setStyleSheet("QMainWindow { background: url(wallpaper-classic.png); background-repeat: no-repeat; background-position: center; }"); } else { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(:/connect.png) }") ); + this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }"); } } else { if (this->wallpaperDayFileExists) { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper.png) }") ); + this->setStyleSheet("QMainWindow { background: url(wallpaper.png); background-repeat: no-repeat; background-position: center; }"); } else { - this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(:/connect.png) }") ); + this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }"); } } ui_->pushButtonNight->show(); + ui_->pushButtonNight2->show(); ui_->pushButtonDay->hide(); - if (this->brightnessSliderVisible) { - ui_->horizontalSliderBrightness->hide(); - ui_->horizontalSliderLabel->hide(); - this->brightnessSliderVisible = false; - } + ui_->pushButtonDay2->hide(); } void f1x::openauto::autoapp::ui::MainWindow::cameraControlHide() { if (this->cameraButtonForce) { - ui_->pushButtonCameraHide->hide(); - ui_->pushButtonStop->hide(); - ui_->pushButtonRecord->hide(); - ui_->pushButtonRecordActive->hide(); - ui_->pushButtonRearcam->hide(); - ui_->pushButtonSave->hide(); - ui_->dashcamBG->hide(); - this->dashcamBGState = false; - ui_->pushButtonCameraShow->show(); + ui_->cameraWidget->hide(); + if (!this->oldGUIStyle) { + ui_->menuWidget->show(); + } else { + ui_->oldmenuWidget->show(); + } } } void f1x::openauto::autoapp::ui::MainWindow::cameraControlShow() { if (this->cameraButtonForce) { - ui_->pushButtonCameraShow->hide(); - QPixmap image; - image.load(":/bg_dashcam.png"); - ui_->dashcamBG->setPixmap(image); - ui_->dashcamBG->show(); - ui_->pushButtonStop->show(); - ui_->pushButtonRecord->show(); - ui_->pushButtonRearcam->show(); - ui_->pushButtonSave->show(); - this->dashcamBGState = true; - ui_->pushButtonCameraHide->show(); - if (this->brightnessSliderVisible) { - ui_->horizontalSliderBrightness->hide(); - ui_->horizontalSliderLabel->hide(); - this->brightnessSliderVisible = false; + if (!this->oldGUIStyle) { + ui_->menuWidget->hide(); + } else { + ui_->oldmenuWidget->hide(); } + ui_->cameraWidget->show(); } } void f1x::openauto::autoapp::ui::MainWindow::toggleExit() { if (!this->exitMenuVisible) { - f1x::openauto::autoapp::ui::MainWindow::cameraControlHide(); - if (this->brightnessSliderVisible) { - ui_->horizontalSliderBrightness->hide(); - ui_->horizontalSliderLabel->hide(); - this->brightnessSliderVisible = false; - } + ui_->pushButtonExit->hide(); ui_->pushButtonShutdown->show(); ui_->pushButtonReboot->show(); ui_->pushButtonCancel->show(); - QPixmap image; - image.load(":/bg_exit.png"); - ui_->exitBG->setPixmap(image); - ui_->exitBG->show(); + ui_->exitWidget->show(); + ui_->buttonWidget->hide(); this->exitMenuVisible = true; } else { ui_->pushButtonShutdown->hide(); ui_->pushButtonReboot->hide(); ui_->pushButtonCancel->hide(); - ui_->exitBG->hide(); + ui_->pushButtonExit->show(); + ui_->buttonWidget->show(); + ui_->exitWidget->hide(); this->exitMenuVisible = false; } } -void f1x::openauto::autoapp::ui::MainWindow::showRearCamBG() +void f1x::openauto::autoapp::ui::MainWindow::toggleMuteButton() { - ui_->pushButtonRearcamBack->show(); - if (this->brightnessSliderVisible) { - ui_->horizontalSliderBrightness->hide(); - ui_->horizontalSliderLabel->hide(); - this->brightnessSliderVisible = false; + if (!this->toggleMute) { + ui_->pushButtonMute->hide(); + ui_->pushButtonUnMute->show(); + this->toggleMute = true; + } else { + ui_->pushButtonUnMute->hide(); + ui_->pushButtonMute->show(); + this->toggleMute = false; } } -void f1x::openauto::autoapp::ui::MainWindow::hideRearCamBG() +void f1x::openauto::autoapp::ui::MainWindow::toggleGUI() { - ui_->pushButtonRearcamBack->hide(); + if (!this->oldGUIStyle) { + ui_->oldmenuWidget->show(); + ui_->menuWidget->hide(); + this->oldGUIStyle = true; + if (!this->NoClock) { + if (UseBigClock) { + ui_->Digital_clock->hide(); + ui_->bigClock->show(); + } else { + ui_->Digital_clock->show(); + ui_->bigClock->hide(); + } + } + MainWindow::on_pushButtonVolume_clicked(); + } else { + ui_->menuWidget->show(); + ui_->oldmenuWidget->hide(); + this->oldGUIStyle = false; + if (!this->NoClock) { + ui_->Digital_clock->show(); + } + } + if (!this->nightModeEnabled) { + if (this->oldGUIStyle) { + if (this->wallpaperClassicDayFileExists) { + this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper-classic.png); background-repeat: no-repeat; background-position: center; }") ); + } + } else { + if (this->wallpaperDayFileExists) { + this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper.png); background-repeat: no-repeat; background-position: center; }") ); + } + } + } else { + if (this->oldGUIStyle) { + if (this->wallpaperClassicNightFileExists) { + this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper-classic-night.png); background-repeat: no-repeat; background-position: center; }") ); + } + } else { + if (this->wallpaperNightFileExists) { + this->setStyleSheet( this->styleSheet().append("QMainWindow { background: url(wallpaper-night.png); background-repeat: no-repeat; background-position: center; }") ); + } + } + } } void f1x::openauto::autoapp::ui::MainWindow::createDebuglog() @@ -509,6 +949,16 @@ void f1x::openauto::autoapp::ui::MainWindow::setPairable() system("/usr/local/bin/autoapp_helper enablepairing &"); } +void f1x::openauto::autoapp::ui::MainWindow::setMute() +{ + system("/usr/local/bin/autoapp_helper setmute &"); +} + +void f1x::openauto::autoapp::ui::MainWindow::setUnMute() +{ + system("/usr/local/bin/autoapp_helper setunmute &"); +} + void f1x::openauto::autoapp::ui::MainWindow::showTime() { using namespace std::this_thread; // sleep_for @@ -519,11 +969,12 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime() if ((time.second() % 2) == 0) { time_text[3] = ' '; time_text[8] = ' '; - + this->update(); + // check if phone is conencted to usb QFileInfo phoneConnectedFile("/tmp/android_device"); if (phoneConnectedFile.exists()) { if (ui_->phoneConnected->isVisible() == false) { - ui_->phoneConnected->setText("Phone connected"); + ui_->phoneConnected->setText("USB connected"); ui_->phoneConnected->show(); } } else { @@ -532,6 +983,7 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime() } } + // check if a device is connected via bluetooth QFileInfo phoneBTConnectedFile("/tmp/btdevice"); if (phoneBTConnectedFile.exists()) { if (ui_->btDevice->isVisible() == false) { @@ -540,7 +992,7 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime() QTextStream data_date(&phoneBTData); QString linedate = data_date.readAll(); phoneBTData.close(); - ui_->btDevice->setText(linedate); + ui_->btDevice->setText(linedate.simplified()); ui_->btDevice->show(); } } else { @@ -549,6 +1001,7 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime() } } + // check the need for system messages QFileInfo configInProgressFile("/tmp/config_in_progress"); QFileInfo debugInProgressFile("/tmp/debug_in_progress"); QFileInfo enablePairingFile("/tmp/enable_pairing"); @@ -558,17 +1011,26 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime() if (configInProgressFile.exists()) { ui_->systemConfigInProgress->setText("System config in progress - please wait ..."); ui_->pushButtonSettings->hide(); + ui_->pushButtonSettings2->hide(); ui_->pushButtonLock->show(); + ui_->pushButtonLock2->show(); ui_->systemConfigInProgress->show(); } if (debugInProgressFile.exists()) { ui_->systemConfigInProgress->setText("Creating debug.zip on /boot - please wait ..."); - ui_->systemDebugging->hide(); + ui_->pushButtonSettings->hide(); + ui_->pushButtonSettings2->hide(); + ui_->pushButtonDebug->hide(); + ui_->pushButtonDebug2->hide(); + ui_->pushButtonLock->show(); + ui_->pushButtonLock2->show(); + ui_->pushButtonDummyDebug->show(); ui_->systemConfigInProgress->show(); } if (enablePairingFile.exists()) { - ui_->systemConfigInProgress->setText("Bluetooth Pairing enabled! "); - ui_->systemDebugging->hide(); + ui_->systemConfigInProgress->setText("Bluetooth Pairing enabled!"); + ui_->pushButtonDebug->hide(); + ui_->pushButtonDebug2->hide(); ui_->systemConfigInProgress->show(); } } @@ -576,38 +1038,21 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime() if (ui_->systemConfigInProgress->isVisible() == true) { ui_->systemConfigInProgress->hide(); ui_->pushButtonSettings->show(); - ui_->pushButtonLock->hide(); + ui_->pushButtonSettings2->show(); + ui_->pushButtonLock->hide(); + ui_->pushButtonLock2->hide(); if (this->systemDebugmode) { - ui_->systemDebugging->show(); + ui_->pushButtonDebug->show(); + ui_->pushButtonDebug2->show(); + ui_->pushButtonDummyDebug->hide(); } } } + // update day/night state QFileInfo nightModeFile("/tmp/night_mode_enabled"); this->nightModeEnabled = nightModeFile.exists(); - if (this->cameraButtonForce) { - QFileInfo rearCamFile("/tmp/rearcam_enabled"); - this->rearCamEnabled = rearCamFile.exists(); - - QFileInfo dashCamRecordingFile("/tmp/dashcam_is_recording"); - this->dashCamRecording = dashCamRecordingFile.exists(); - - if (this->dashcamBGState) { - if (this->dashCamRecording) { - if (ui_->pushButtonRecord->isVisible() == true) { - ui_->pushButtonRecordActive->show(); - ui_->pushButtonRecord->hide(); - } - } else { - if (ui_->pushButtonRecordActive->isVisible() == true) { - ui_->pushButtonRecord->show(); - ui_->pushButtonRecordActive->hide(); - } - } - } - } - if (this->nightModeEnabled) { if (!this->DayNightModeState) { this->DayNightModeState = true; @@ -620,44 +1065,52 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime() } } + // camera stuff if (this->cameraButtonForce) { + + // check if dashcam is recording + QFileInfo dashCamRecordingFile("/tmp/dashcam_is_recording"); + this->dashCamRecording = dashCamRecordingFile.exists(); + + // show recording state if dashcam is visible + if (ui_->cameraWidget->isVisible() == true) { + if (this->dashCamRecording) { + if (ui_->pushButtonRecord->isVisible() == true) { + ui_->pushButtonRecordActive->show(); + ui_->pushButtonRecord->hide(); + } + } else { + if (ui_->pushButtonRecordActive->isVisible() == true) { + ui_->pushButtonRecord->show(); + ui_->pushButtonRecordActive->hide(); + } + } + } + + // check if rearcam is eanbled + QFileInfo rearCamFile("/tmp/rearcam_enabled"); + this->rearCamEnabled = rearCamFile.exists(); + if (this->rearCamEnabled) { - if (!this->rearcamState) { - this->rearcamState = true; - f1x::openauto::autoapp::ui::MainWindow::cameraControlHide(); - f1x::openauto::autoapp::ui::MainWindow::showRearCamBG(); - f1x::openauto::autoapp::ui::MainWindow::showRearCam(); + if (!this->rearCamVisible) { + this->rearCamVisible = true; + f1x::openauto::autoapp::ui::MainWindow::MainWindow::showRearCam(); } } else { - if (this->rearcamState) { - this->rearcamState = false; - f1x::openauto::autoapp::ui::MainWindow::hideRearCamBG(); - f1x::openauto::autoapp::ui::MainWindow::hideRearCam(); + if (this->rearCamVisible) { + this->rearCamVisible = false; + f1x::openauto::autoapp::ui::MainWindow::MainWindow::hideRearCam(); } } } + + // check if sutdown is external triggered and init clean app exit QFileInfo externalExitFile("/tmp/external_exit"); if (externalExitFile.exists()) { f1x::openauto::autoapp::ui::MainWindow::MainWindow::exit(); } - - if (this->kodiButtonForce) { - QFileInfo kodiRunningFile("/tmp/kodi_running"); - if (kodiRunningFile.exists()) { - if (ui_->kodiBG->isVisible() == false) { - ui_->kodiBG->hide(); - QPixmap image; - image.load(":/black.png"); - ui_->kodiBG->setPixmap(image); - ui_->kodiBG->show(); - } - } else { - if (ui_->kodiBG->isVisible() == true) { - ui_->kodiBG->hide(); - } - } - } } ui_->Digital_clock->setText(time_text); + ui_->bigClock->setText(time_text); sleep_for(milliseconds(10)); } diff --git a/src/autoapp/UI/SettingsWindow.cpp b/src/autoapp/UI/SettingsWindow.cpp index 88f86af..0b36f44 100644 --- a/src/autoapp/UI/SettingsWindow.cpp +++ b/src/autoapp/UI/SettingsWindow.cpp @@ -43,6 +43,7 @@ SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configurat connect(ui_->pushButtonSave, &QPushButton::clicked, this, &SettingsWindow::onSave); connect(ui_->pushButtonUnpair , &QPushButton::clicked, this, &SettingsWindow::unpairAll); connect(ui_->horizontalSliderScreenDPI, &QSlider::valueChanged, this, &SettingsWindow::onUpdateScreenDPI); + connect(ui_->horizontalSliderAlphaTrans, &QSlider::valueChanged, this, &SettingsWindow::onUpdateAlphaTrans); connect(ui_->radioButtonUseExternalBluetoothAdapter, &QRadioButton::clicked, [&](bool checked) { ui_->lineEditExternalBluetoothAdapterAddress->setEnabled(checked); }); connect(ui_->radioButtonDisableBluetooth, &QRadioButton::clicked, [&]() { ui_->lineEditExternalBluetoothAdapterAddress->setEnabled(false); }); connect(ui_->radioButtonUseLocalBluetoothAdapter, &QRadioButton::clicked, [&]() { ui_->lineEditExternalBluetoothAdapterAddress->setEnabled(false); }); @@ -63,7 +64,12 @@ SettingsWindow::~SettingsWindow() void SettingsWindow::onSave() { configuration_->setHandednessOfTrafficType(ui_->radioButtonLeftHandDrive->isChecked() ? configuration::HandednessOfTrafficType::LEFT_HAND_DRIVE : configuration::HandednessOfTrafficType::RIGHT_HAND_DRIVE); + configuration_->showClock(ui_->checkBoxShowClock->isChecked()); + configuration_->showBigClock(ui_->checkBoxShowBigClock->isChecked()); + configuration_->oldGUI(ui_->checkBoxOldGUI->isChecked()); + configuration_->setAlphaTrans(static_cast(ui_->horizontalSliderAlphaTrans->value())); + configuration_->setVideoFPS(ui_->radioButton30FPS->isChecked() ? aasdk::proto::enums::VideoFPS::_30 : aasdk::proto::enums::VideoFPS::_60); if(ui_->radioButton480p->isChecked()) @@ -233,6 +239,10 @@ void SettingsWindow::load() ui_->radioButtonLeftHandDrive->setChecked(configuration_->getHandednessOfTrafficType() == configuration::HandednessOfTrafficType::LEFT_HAND_DRIVE); ui_->radioButtonRightHandDrive->setChecked(configuration_->getHandednessOfTrafficType() == configuration::HandednessOfTrafficType::RIGHT_HAND_DRIVE); ui_->checkBoxShowClock->setChecked(configuration_->showClock()); + ui_->horizontalSliderAlphaTrans->setValue(static_cast(configuration_->getAlphaTrans())); + + ui_->checkBoxShowBigClock->setChecked(configuration_->showBigClock()); + ui_->checkBoxOldGUI->setChecked(configuration_->oldGUI()); ui_->radioButton30FPS->setChecked(configuration_->getVideoFPS() == aasdk::proto::enums::VideoFPS::_30); ui_->radioButton60FPS->setChecked(configuration_->getVideoFPS() == aasdk::proto::enums::VideoFPS::_60); @@ -342,6 +352,12 @@ void SettingsWindow::onUpdateScreenDPI(int value) ui_->labelScreenDPIValue->setText(QString::number(value)); } +void SettingsWindow::onUpdateAlphaTrans(int value) +{ + double alpha = value/100.0; + ui_->labelAlphaTransValue->setText(QString::number(alpha)); +} + void SettingsWindow::onUpdateSystemVolume(int value) { ui_->labelSystemVolumeValue->setText(QString::number(value)); diff --git a/src/autoapp/UI/mainwindow.ui b/src/autoapp/UI/mainwindow.ui index 35bf719..27ba80f 100644 --- a/src/autoapp/UI/mainwindow.ui +++ b/src/autoapp/UI/mainwindow.ui @@ -6,880 +6,2141 @@ 0 0 - 800 - 480 + 740 + 837 + + + 0 + 0 + + MainWindow - - - - - 20 - 20 - 640 - 440 - - - - - - - 668 - 12 - 120 - 24 - - - - - 120 - 24 - - - - - Roboto - 16 - 75 - true - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 618 - -8 - 64 - 64 - - - - - :/ico_bluetooth.png - - - - - 24 - 24 - - - - background: rgba(255,255,255,0); - - - - - - 608 - 52 - 180 - 24 - - - - - 180 - 24 - - - - - Roboto - 16 - 75 - true - - - - color: #0000FF; - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 578 - 368 - 210 - 24 - - - - - 210 - 24 - - - - - Roboto - 14 - 75 - true - PreferAntialias - - - - Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing - - - - - - 578 - 412 - 210 - 24 - - - - - 210 - 24 - - - - - Roboto - 8 - 75 - true - PreferAntialias - - - - Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing - - - - - - 578 - 446 - 210 - 24 - - - - - 210 - 24 - - - - - Roboto - 8 - 75 - true - PreferAntialias - - - - Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing - - - - - - 30 - 34 - 64 - 64 - - - - - :/settings-hot.png:/settings-hot.png - - - - 64 - 64 - - - - true - - - - - - 30 - 104 - 64 - 64 - - - - - :/wifi-hot.png:/wifi-hot.png - - - - 64 - 64 - - - - true - - - - - - 30 - 104 - 64 - 64 - - - - - :/kodi-hot.png:/kodi-hot.png - - - - 64 - 64 - - - - true - - - - - - 30 - 174 - 64 - 64 - - - - display: none; - - - - - - - :/cursor-hot.png:/cursor-hot.png - - - - 64 - 64 - - - - true - - - - - - 30 - 174 - 64 - 64 - - - - display: none; - - - - - - - :/day-hot.png:/day-hot.png - - - - 64 - 64 - - - - true - - - - - - 30 - 174 - 64 - 64 - - - - display: none; - - - - - - - :/night-hot.png:/night-hot.png - - - - 64 - 64 - - - - true - - - - - - 30 - 244 - 64 - 64 - - - - - :/brightness-hot.png:/brightness-hot.png - - - - 64 - 64 - - - - true - - - - - - 30 - 314 - 64 - 64 - - - - - :/camera-hot.png:/camera-hot.png - - - - 64 - 64 - - - - true - - - - - - 30 - 314 - 64 - 64 - - - - - :/camera-hot.png:/camera-hot.png - - - - 64 - 64 - - - - true - - - - - - 30 - 384 - 64 - 64 - - - - - :/power-hot.png:/power-hot.png - - - - 64 - 64 - - - - true - - - - - - 130 - 20 - 640 - 440 - - - - - - - 146 - 384 - 64 - 64 - - - - - :/stop-hot.png:/stop-hot.png - - - - 64 - 64 - - - - true - - - - - - 216 - 384 - 64 - 64 - - - - - :/record-hot.png:/record-hot.png - - - - 64 - 64 - - - - true - - - - - - 216 - 384 - 64 - 64 - - - - - :/recordactive-hot.png:/recordactive-hot.png - - - - 64 - 64 - - - - true - - - - - - 286 - 384 - 64 - 64 - - - - - :/rearcam-hot.png:/rearcam-hot.png - - - - 64 - 64 - - - - true - - - - - - 690 - 384 - 64 - 64 - - - - - :/save-hot.png:/save-hot.png - - - - 64 - 64 - - - - true - - - - - true - - - - 284 - 198 - 232 - 84 - - - - - - - 294 - 208 - 64 - 64 - - - - - :/power-hot.png:/power-hot.png - - - - 64 - 64 - - - - true - - - - - - 368 - 208 - 64 - 64 - - - - - :/reboot-hot.png:/reboot-hot.png - - - - 64 - 64 - - - - true - - - - - - 442 - 208 - 64 - 64 - - - - - :/back-hot.png:/back-hot.png - - - - 64 - 64 - - - - true - - - - - true - - - - 0 - 0 - 800 - 480 - - - - - :/bg_rearcam.png:/bg_rearcam.png - - - - 800 - 480 - - - - true - - - - - - 200 - 210 - 400 - 60 - - - - 30 - - - 255 - - - 25 - - - Qt::Horizontal - - - 25 - - - - - - 198 - 212 - 400 - 12 - - - - - Roboto - 8 - 75 - true - PreferAntialias - - - - Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing - - - - - - 175 - 368 - 450 - 24 - - - - - 210 - 24 - - - - - Roboto - 14 - 75 - true - PreferAntialias - - - - System config in progress - please wait ... - - - Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing - - - - - - 0 - 456 - 800 - 24 - - - - - 800 - 24 - - - - - Roboto - 14 - 75 - true - PreferAntialias - - - - false - - - QPushButton { background: grey; border: none; } -QPushButton:pressed { background: orange; border: none; } - - - Create Debug Log - - - - 0 - 0 - - - - false - - - false - - - false - - - true - - - - - - 30 - 34 - 64 - 64 - - - - - :/lock-hot.png:/lock-hot.png - - - - 64 - 64 - - - - true - - - - - - 0 - 0 - 800 - 480 - - - - masterButtonBG - pushButtonSettings - pushButtonLock - pushButtonWirelessConnection - pushButtonKodi - pushButtonBluetooth - pushButtonToggleCursor - pushButtonDay - pushButtonNight - pushButtonBrightness - pushButtonCameraShow - pushButtonCameraHide - pushButtonExit - Digital_clock - btDevice - phoneConnected - versionString - dateString - dashcamBG - pushButtonStop - pushButtonRecord - pushButtonRecordActive - pushButtonRearcam - pushButtonSave - exitBG - pushButtonShutdown - pushButtonReboot - pushButtonCancel - systemConfigInProgress - systemDebugging - horizontalSliderBrightness - horizontalSliderLabel - kodiBG - pushButtonRearcamBack + + + true + + + + 0 + 0 + + + + false + + + + 4 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + background-color: rgb(0, 0, 0); + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 6 + + + + + + 75 + true + PreferDefault + + + + background-color: rgb(164, 0, 0); +color: rgb(255, 255, 255); + + + Dev Mode Enabled + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + DejaVu Sans + 14 + 75 + true + true + false + + + + background-color: rgba(255, 255, 255, 0); + + + <html><head/><body><p><span style=" font-style:normal; color:#ffffff;">crank</span><span style=" font-style:normal; color:#5ce739;">shaft </span><span style=" font-style:normal; color:#40bfbf;">NG </span><span style=" font-style:normal; color:#888a85;">- OpenCarOS</span></p></body></html> + + + Qt::AlignCenter + + + + + + + + 75 + true + + + + background-color: rgb(164, 0, 0); +color: rgb(255, 255, 255); + + + Dev Mode Enabled + + + Qt::AlignCenter + + + + + + + + + 6 + + + + + + 75 + true + + + + background-color: rgba(255, 255, 255, 0); +color: rgb(255, 255, 255); + + + BuildID + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 75 + true + + + + background-color: rgba(255, 255, 255, 0); +color: rgb(255, 255, 255); + + + USB Connected + + + Qt::AlignCenter + + + + + + + + 75 + true + + + + background-color: rgba(255, 255, 255, 0); +color: rgb(0, 102, 255); + + + BT-Device + + + Qt::AlignCenter + + + + + + + 6 + + + + + + 80 + 0 + + + + + 80 + 16777215 + + + + + 0 + 0 + + + + background-color: rgb(32, 74, 135); +color: rgb(239, 239, 239); + + + BT-Pairing + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + + 75 + true + + + + background-color: rgba(255, 255, 255, 0); +color: rgb(255, 255, 255); + + + 12:00:00 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + true + + + + 0 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 6 + + + + + + 0 + 0 + + + + + 0 + 0 + + + + background: rgba(252, 233, 79, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + :/day-hot.png + + + + + 64 + 64 + + + + false + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + background-color: rgba(114, 159, 207, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + :/night-hot.png + + + + + 64 + 64 + + + + + + + + + 0 + 0 + + + + background-color: rgba(173, 127, 168, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + :/skin-hot.png + + + + + 64 + 64 + + + + + + + + + + 6 + + + + + + 0 + 0 + + + + background-color: rgba(100, 62, 4, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + :/camera-hot.png + + + + + 64 + 64 + + + + + + + + + 0 + 0 + + + + background-color: rgba(100, 62, 4, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + background-color: rgba(186, 189, 182, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); +color: rgb(255, 255, 255); + + + + + + + + + + + + + + + 0 + 0 + + + + background-color: rgba(164, 0, 0, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + :/power-hot.png + + + + + 64 + 64 + + + + + + + + + 0 + 0 + + + + background-color: rgba(239, 41, 41, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + :/power-hot.png + + + + + 64 + 64 + + + + + + + + + 0 + 0 + + + + background-color: rgba(252, 175, 62, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + :/reboot-hot.png + + + + + 64 + 64 + + + + + + + + + 0 + 0 + + + + background-color: rgba(32, 74, 135, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + :/back-hot.png + + + + + 64 + 64 + + + + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + background-color: rgba(186, 189, 182, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); +color: rgb(255, 255, 255); + + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + background-color: rgba(186, 189, 182, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); +color: rgb(255, 255, 255); + + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + background-color: rgba(186, 189, 182, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); +color: rgb(255, 255, 255); + + + + + + + + + + + + + + + 0 + 0 + + + + background-color: rgba(237, 164, 255, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + :/eye-hot.png + + + + + 64 + 64 + + + + + + + + + 0 + 0 + + + + background-color: rgba(15, 54, 5, 0.5); +color: rgb(255, 255, 255); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + + :/lock-hot.png + + + + + 64 + 64 + + + + + + + + + 0 + 0 + + + + background-color: rgba(138, 226, 52, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + :/settings-hot.png + + + + + 64 + 64 + + + + true + + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 75 + true + + + + background-color: rgba(186, 189, 182, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); +color: rgb(255, 255, 255); + + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + background-color: rgba(186, 189, 182, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); +color: rgb(255, 255, 255); + + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + background-color: rgba(186, 189, 182, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); +color: rgb(255, 255, 255); + + + + + + false + + + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + background-color: rgba(186, 189, 182, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); +color: rgb(255, 255, 255); + + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + background-color: rgba(186, 189, 182, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); +color: rgb(255, 255, 255); + + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + background-color: rgba(186, 189, 182, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); +color: rgb(255, 255, 255); + + + + + + + + + + + + + + + 0 + 0 + + + + background-color: rgba(85, 87, 83, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + :/bug-hot.png + + + + + 64 + 64 + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + background-color: rgba(186, 189, 182, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); +color: rgb(255, 255, 255); + + + + + + + + + + + 0 + 0 + + + + background-color: rgba(186, 189, 182, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); +color: rgb(255, 255, 255); + + + + + + + + + + + + + + + 0 + 0 + + + + background-color: rgba(245, 121, 0, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + :/brightness-hot.png + + + + + 64 + 64 + + + + + + + + + 0 + 0 + + + + background-color: rgba(64, 191, 191, 0.5); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + :/volume-hot.png + + + + + 64 + 64 + + + + + + + + + + + + + + 0 + 0 + + + + + 4 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + 0 + 0 + + + + + 10 + + + 10 + + + 0 + + + 10 + + + + + + 0 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + :/settings-hot.png + + + + + 50 + 50 + + + + + + + + + 0 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + :/lock-hot.png + + + + + 50 + 50 + + + + + + + + + 0 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + :/day-hot.png + + + + + 50 + 50 + + + + + + + + + 0 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + :/night-hot.png + + + + + 50 + 50 + + + + + + + + + 0 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + :/brightness-hot.png + + + + + 50 + 50 + + + + + + + + + 0 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + :/power-hot.png + + + + + 50 + 50 + + + + + + + + + + + + 0 + 0 + + + + + 10 + + + 10 + + + 0 + + + 10 + + + + + + 0 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + :/power-hot.png + + + + + 50 + 50 + + + + + + + + + 0 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + :/reboot-hot.png + + + + + 50 + 50 + + + + + + + + + 0 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + :/back-hot.png + + + + + 50 + 50 + + + + + + + + + + + + 0 + 0 + + + + + 80 + + + + color: rgb(255, 255, 255); + + + 12:00:00 + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + + + + + + + + 0 + 0 + + + + + 10 + + + 10 + + + 10 + + + + + + 0 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + :/camera-hot.png + + + + + 50 + 50 + + + + + + + + + 0 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + :/volume-hot.png + + + + + 50 + 50 + + + + + + + + + 0 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + :/eye-hot.png + + + + + 50 + 50 + + + + + + + + + 0 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + :/bug-hot.png + + + + + 50 + 50 + + + + + + + + + 0 + 0 + + + + + 62 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + 50 + 50 + + + + + + + + + 0 + 0 + + + + + 62 + 0 + + + + background-color: rgba(136, 138, 133, 0.5); + + + + + + + 50 + 50 + + + + + + + + + + + + + + + + + + + 0 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + background-color: rgba(0, 0, 0, 1); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + + + + + + + + + + + 0 + 0 + + + + background-color: rgb(186, 189, 182); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + Record + + + + :/record-hot.png + + + + + 32 + 32 + + + + + + + + + 0 + 0 + + + + background-color: rgb(186, 189, 182); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + Record + + + + :/recordactive-hot.png + + + + + 32 + 32 + + + + + + + + + 0 + 0 + + + + background-color: rgb(186, 189, 182); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + Stop + + + + :/stop-hot.png + + + + + 32 + 32 + + + + + + + + + 0 + 0 + + + + background-color: rgb(186, 189, 182); +border-radius: 4px; +border: 2px solid rgba(255,255,255,0.5); + + + Save + + + + :/save-hot.png + + + + + 32 + 32 + + + + + + + + + + + + + false + + + + 0 + 0 + + + + + 0 + 30 + + + + background-color: rgb(92, 231, 57); +color: rgb(0, 0, 0); + + + System messages + + + false + + + Qt::AlignCenter + + + 0 + + + + + + + + + + 0 + 0 + + + + + 80 + 30 + + + + + 80 + 30 + + + + color: rgb(255, 255, 255); +background-color: rgb(164, 0, 0); + + + Muted + + + + + + + + 0 + 0 + + + + + 80 + 30 + + + + + 80 + 30 + + + + color: rgb(255, 255, 255); +background-color: #6d6d6d; + + + Mute + + + false + + + + + + + + 0 + 0 + + + + + 0 + 30 + + + + QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} +QSlider::handle:horizontal { background: rgb(64, 191, 191); height: 52px; width: 52px; margin: 0 0;}; + + + 100 + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + + 40 + 30 + + + + + 40 + 16777215 + + + + + 75 + true + + + + color: rgb(255, 255, 255); +background-color: #6d6d6d; + + + - + + + Qt::AlignCenter + + + + + + + + + + + + 0 + 0 + + + + + 0 + 30 + + + + + + + + + + QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} +QSlider::handle:horizontal { background: rgb(245, 121, 0); height: 52px; width: 52px; margin: 0 0;}; + + + 30 + + + 255 + + + 25 + + + 30 + + + 30 + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + + 40 + 30 + + + + + 40 + 16777215 + + + + + 75 + true + + + + color: rgb(255, 255, 255); +background-color: #6d6d6d; + + + - + + + Qt::AlignCenter + + + + + + + + + + + + 0 + 30 + + + + QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} +QSlider::handle:horizontal { background: rgb(173, 127, 168); height: 52px; width: 52px; margin: 0 0;}; + + + 1 + + + 100 + + + 1 + + + 50 + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + + 40 + 30 + + + + + 40 + 16777215 + + + + + 75 + true + + + + color: rgb(255, 255, 255); +background-color: #6d6d6d; + + + 0.5 + + + Qt::AlignCenter + + + + + + - - pushButtonSettings - pushButtonWirelessConnection - pushButtonToggleCursor - pushButtonBrightness - pushButtonExit - systemDebugging - - - - + + diff --git a/src/autoapp/UI/settingswindow.ui b/src/autoapp/UI/settingswindow.ui index c3896c3..59e7489 100644 --- a/src/autoapp/UI/settingswindow.ui +++ b/src/autoapp/UI/settingswindow.ui @@ -123,18 +123,109 @@ color: rgb(238, 238, 236); - + - 10 + 0 110 - 111 - 23 + 646 + 131 - - Show clock + + GUI + + + + 10 + 30 + 111 + 23 + + + + Show clock + + + + + + 10 + 60 + 221 + 23 + + + + Use classic gui on startup + + + + + + 10 + 90 + 381 + 23 + + + + Use big clock in classic gui (only if show clock enabled) + + + + + + + 0 + 250 + 646 + 81 + + + + Transparency Tile GUI on Startup + + + + + 570 + 40 + 41 + 31 + + + + 0.5 + + + + + + 20 + 40 + 531 + 34 + + + + QSlider::handle:horizontal { background: white; height: 32px; width: 52px; margin: 0 0;} +QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} + + + 1 + + + 100 + + + 50 + + + Qt::Horizontal + + diff --git a/src/autoapp/autoapp.cpp b/src/autoapp/autoapp.cpp index 84cf60a..6a9b210 100644 --- a/src/autoapp/autoapp.cpp +++ b/src/autoapp/autoapp.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -84,6 +85,10 @@ int main(int argc, char* argv[]) startIOServiceWorkers(ioService, threadPool); QApplication qApplication(argc, argv); + const int width = QApplication::desktop()->width(); + OPENAUTO_LOG(info) << "[OpenAuto] Display width: " << width; + const int height = QApplication::desktop()->height(); + OPENAUTO_LOG(info) << "[OpenAuto] Display height: " << height; auto configuration = std::make_shared(); @@ -100,7 +105,7 @@ int main(int argc, char* argv[]) autoapp::ui::ConnectDialog connectDialog(ioService, tcpWrapper, recentAddressesList); connectDialog.setWindowFlags(Qt::WindowStaysOnTopHint); - QObject::connect(&mainWindow, &autoapp::ui::MainWindow::exit, []() { std::exit(0); }); + QObject::connect(&mainWindow, &autoapp::ui::MainWindow::exit, []() { system("touch /tmp/shutdown"); std::exit(0); }); QObject::connect(&mainWindow, &autoapp::ui::MainWindow::reboot, []() { system("touch /tmp/reboot"); std::exit(0); }); QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openSettings, &settingsWindow, &autoapp::ui::SettingsWindow::showFullScreen); QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openSettings, &settingsWindow, &autoapp::ui::SettingsWindow::loadSystemValues); @@ -178,7 +183,7 @@ int main(int argc, char* argv[]) QObject::connect(&mainWindow, &autoapp::ui::MainWindow::TriggerScriptNight, [&qApplication]() { #ifdef RASPBERRYPI3 - system("/opt/crankshaft/service_daynight.sh app night &"); + system("/opt/crankshaft/service_daynight.sh app night"); OPENAUTO_LOG(info) << "[CS] Run night script."; #else OPENAUTO_LOG(info) << "[CS] You are not running this on a Raspberry Pi, skipping Day/Night script."; @@ -187,23 +192,16 @@ int main(int argc, char* argv[]) QObject::connect(&mainWindow, &autoapp::ui::MainWindow::TriggerScriptDay, [&qApplication]() { #ifdef RASPBERRYPI3 - system("/opt/crankshaft/service_daynight.sh app day &"); + system("/opt/crankshaft/service_daynight.sh app day"); OPENAUTO_LOG(info) << "[CS] Run day script."; #else OPENAUTO_LOG(info) << "[CS] You are not running this on a Raspberry Pi, skipping Day/Night script."; #endif }); - QObject::connect(&mainWindow, &autoapp::ui::MainWindow::startKodi, [&qApplication]() { -#ifdef RASPBERRYPI3 - system("/usr/bin/kodi &"); - OPENAUTO_LOG(info) << "[CS] Run kodi binary."; -#else - OPENAUTO_LOG(info) << "[CS] You are not running this on a Raspberry Pi, skipping kodi."; -#endif - }); - mainWindow.showFullScreen(); + mainWindow.setFixedSize(width, height); + //mainWindow.adjustSize(); aasdk::usb::USBWrapper usbWrapper(usbContext); aasdk::usb::AccessoryModeQueryFactory queryFactory(usbWrapper, ioService);