From c6ebdbe89bd62c0708cd73c834fd4e973404c3d2 Mon Sep 17 00:00:00 2001 From: Yoann Laissus Date: Thu, 10 May 2018 13:12:42 +0200 Subject: [PATCH] Add detection of Android TV devices with a proper icon Android app : https://phabricator.kde.org/D12803 Test Plan: Tested with an Android TV device (Nvidia Shield) Reviewers: #kde_connect, nicolasfella Reviewed By: #kde_connect, nicolasfella Subscribers: kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D12802 --- core/device.cpp | 2 + core/device.h | 1 + icon/32-status-tvconnected.png | Bin 0 -> 1153 bytes icon/32-status-tvdisconnected.png | Bin 0 -> 210 bytes icon/32-status-tvtrusted.png | Bin 0 -> 961 bytes icon/CMakeLists.txt | 6 ++ icon/sc-status-tvconnected.svg | 124 ++++++++++++++++++++++++++++++ icon/sc-status-tvdisconnected.svg | 106 +++++++++++++++++++++++++ icon/sc-status-tvtrusted.svg | 111 ++++++++++++++++++++++++++ 9 files changed, 350 insertions(+) create mode 100644 icon/32-status-tvconnected.png create mode 100644 icon/32-status-tvdisconnected.png create mode 100644 icon/32-status-tvtrusted.png create mode 100644 icon/sc-status-tvconnected.svg create mode 100644 icon/sc-status-tvdisconnected.svg create mode 100644 icon/sc-status-tvtrusted.svg diff --git a/core/device.cpp b/core/device.cpp index fa600213c..cdcbf949f 100644 --- a/core/device.cpp +++ b/core/device.cpp @@ -393,6 +393,7 @@ Device::DeviceType Device::str2type(const QString& deviceType) { if (deviceType == QLatin1String("laptop")) return Laptop; if (deviceType == QLatin1String("smartphone") || deviceType == QLatin1String("phone")) return Phone; if (deviceType == QLatin1String("tablet")) return Tablet; + if (deviceType == QLatin1String("tv")) return Tv; return Unknown; } @@ -401,6 +402,7 @@ QString Device::type2str(Device::DeviceType deviceType) { if (deviceType == Laptop) return QStringLiteral("laptop"); if (deviceType == Phone) return QStringLiteral("smartphone"); if (deviceType == Tablet) return QStringLiteral("tablet"); + if (deviceType == Tv) return QStringLiteral("tv"); return QStringLiteral("unknown"); } diff --git a/core/device.h b/core/device.h index d8ab653b8..b299f0f3d 100644 --- a/core/device.h +++ b/core/device.h @@ -55,6 +55,7 @@ public: Laptop, Phone, Tablet, + Tv, }; /** diff --git a/icon/32-status-tvconnected.png b/icon/32-status-tvconnected.png new file mode 100644 index 0000000000000000000000000000000000000000..fa079bddbb7f553445a26423ec738868b94d60c3 GIT binary patch literal 1153 zcmV-{1b+L8P)t=KlH5kZ4U6}3fZg=|r;3u5b*=FDAm|*(h5c&G>d|5lZ{&tgeKX^ z%iI{7>kD6lWxVpvF!YGzXjkHlj=<Ooep}jBri;R*8n0S~xE%w^4+= zJ;ZpfXTCzL(kE9w=tA%NHfwm5Z2Yk2g_rAH*#9C1b8 z>Dym?RswL#^aZWWQ#a>DX>Af%CEs5Kz{+NOuEklRxfA7DJ>ccS)+zwbpi;rlt-Pv+ zD)>3D1}z#)L;UZ>aVhGofNM~^nu(?#Yp7UIt8`qH zcr^=klk`z>yc7{JFpnpn)aUoCb2)81if~TTwV2cpK7TX+-O!f;79+mA7EnDVo(=vm z_lEJJ1bdYpV5Ji&f3_-&4FrFjhY=CapzL$2bQ1&9{m(vGz2EOs9}GC!l~eg9WO#p5 z)C>1~5iIW$m-hqIxKG+0xSXcKj9xS6?v#$;6`2~F0#7V&QmZg5VlWV2?7o3wn~VEp*-r)zod-L3xs(H(WL T=RB9|00000NkvXXu0mjfjRzO2 literal 0 HcmV?d00001 diff --git a/icon/32-status-tvdisconnected.png b/icon/32-status-tvdisconnected.png new file mode 100644 index 0000000000000000000000000000000000000000..7330dbd5407db6091250fc6f5c98fe6a0b890403 GIT binary patch literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmSQK*5Dp-y;YjHK@;M7UB8wRq z_>O=u<5X=vX`rBFiEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$Qb0xio-U3d z5v^~p9^?gD;T&kP?s}$VfcXRs3H|@Es@v2Jm>bUDdKY+U4M*Yk+;f+iF3Q_VPjF@A x3TR+bmRb>Y+}~r?&8Fk-N?d#FY#2VAW?H8sI9*9^0t?V+22WQ%mvv4FO#o2kKMDW< literal 0 HcmV?d00001 diff --git a/icon/32-status-tvtrusted.png b/icon/32-status-tvtrusted.png new file mode 100644 index 0000000000000000000000000000000000000000..12a5e6598eefe7ce371a0bfb79e01eb9e40628c0 GIT binary patch literal 961 zcmV;y13vtTP)TA^*=AK(s9cFt{_CV+%t_y%y* z%n~z;fZIuuY&VN^_rCF zW4;Vrbj~dgXndert+pNn!3MB2Jw1J|UavpsqU;c|<^a`dbq!cFv#;qW`p|`{z6pHjoO=l{RUP!b_mp!^ z08!On&Fp%mQn}TR`5iEydY<<_sSmDo^RbmG!bIc~;7j1Uw#UIM$mMdgKvFK3e>jO@ zKec{iQ`NKWu>%0l^9n#TEc3Qn3t6EH0C?H+yrEU!Rwk2K<*pp&*y)kV+Zc+2P~7xTm(K=)pMt1p3CL3z`XDK@6u6yS4+0Jx%qDp z1owcYnVFf5dcFSFNz7ICoQN!o$c1vb{Cj7-XHQtG)wY5lSO;zfLC~z#YU{`F7FE3r zd?6wiqA0r4bJ7#&UjS|Zqrkj#?)Fif!!VpPv(L=zKi~H+t*op(cr4`+@`3jctI@(a|XpnF8j_EaXx5vk*nm_nhQl(y1^E&jJNA%K{U?bFI+dz^;g_ j0p%!)ej6n3)2;sj=GsLd_+d(V00000NkvXXu0mjfsg}Uk literal 0 HcmV?d00001 diff --git a/icon/CMakeLists.txt b/icon/CMakeLists.txt index cf05f32f6..4becac5dc 100644 --- a/icon/CMakeLists.txt +++ b/icon/CMakeLists.txt @@ -24,6 +24,9 @@ ICONS 32-status-tabletconnected.png 32-status-tabletdisconnected.png 32-status-tablettrusted.png + 32-status-tvconnected.png + 32-status-tvdisconnected.png + 32-status-tvtrusted.png sc-status-laptopconnected.svg sc-status-laptopdisconnected.svg sc-status-laptoptrusted.svg @@ -33,6 +36,9 @@ ICONS sc-status-tabletconnected.svg sc-status-tabletdisconnected.svg sc-status-tablettrusted.svg + sc-status-tvconnected.svg + sc-status-tvdisconnected.svg + sc-status-tvtrusted.svg DESTINATION ${ICON_INSTALL_DIR} ) diff --git a/icon/sc-status-tvconnected.svg b/icon/sc-status-tvconnected.svg new file mode 100644 index 000000000..370f6d4d8 --- /dev/null +++ b/icon/sc-status-tvconnected.svg @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + +   + + + + diff --git a/icon/sc-status-tvdisconnected.svg b/icon/sc-status-tvdisconnected.svg new file mode 100644 index 000000000..2829658e6 --- /dev/null +++ b/icon/sc-status-tvdisconnected.svg @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + +   + + + diff --git a/icon/sc-status-tvtrusted.svg b/icon/sc-status-tvtrusted.svg new file mode 100644 index 000000000..9a8efa916 --- /dev/null +++ b/icon/sc-status-tvtrusted.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + +   + + + +