From 003c4f4197e99a90083639ab29160185082f7da3 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Fri, 12 Jun 2020 08:37:15 +0200 Subject: [PATCH] implement design --- examples/iot-dashboard/MenuBar.cpp | 17 ++++++++++++----- examples/iot-dashboard/images.qrc | 10 +++++++--- examples/iot-dashboard/images/dashboard.png | Bin 0 -> 317 bytes examples/iot-dashboard/images/dashboard.svg | 5 +++++ examples/iot-dashboard/images/details.png | Bin 375 -> 0 bytes examples/iot-dashboard/images/devices.png | Bin 0 -> 247 bytes examples/iot-dashboard/images/devices.svg | 9 +++++++++ examples/iot-dashboard/images/home.png | Bin 1753 -> 0 bytes examples/iot-dashboard/images/logout.png | Bin 0 -> 251 bytes examples/iot-dashboard/images/logout.svg | 11 +++++++++++ examples/iot-dashboard/images/main-icon.png | Bin 0 -> 942 bytes examples/iot-dashboard/images/main-icon.svg | 13 +++++++++++++ examples/iot-dashboard/images/members.png | Bin 0 -> 322 bytes examples/iot-dashboard/images/members.svg | 4 ++++ examples/iot-dashboard/images/rooms.png | Bin 0 -> 275 bytes examples/iot-dashboard/images/rooms.svg | 4 ++++ examples/iot-dashboard/images/settings.png | Bin 729 -> 0 bytes examples/iot-dashboard/images/statistics.png | Bin 518 -> 225 bytes examples/iot-dashboard/images/statistics.svg | 4 ++++ examples/iot-dashboard/images/storage.png | Bin 0 -> 262 bytes examples/iot-dashboard/images/storage.svg | 4 ++++ 21 files changed, 73 insertions(+), 8 deletions(-) create mode 100644 examples/iot-dashboard/images/dashboard.png create mode 100644 examples/iot-dashboard/images/dashboard.svg delete mode 100644 examples/iot-dashboard/images/details.png create mode 100644 examples/iot-dashboard/images/devices.png create mode 100644 examples/iot-dashboard/images/devices.svg delete mode 100644 examples/iot-dashboard/images/home.png create mode 100644 examples/iot-dashboard/images/logout.png create mode 100644 examples/iot-dashboard/images/logout.svg create mode 100644 examples/iot-dashboard/images/main-icon.png create mode 100644 examples/iot-dashboard/images/main-icon.svg create mode 100644 examples/iot-dashboard/images/members.png create mode 100644 examples/iot-dashboard/images/members.svg create mode 100644 examples/iot-dashboard/images/rooms.png create mode 100644 examples/iot-dashboard/images/rooms.svg delete mode 100644 examples/iot-dashboard/images/settings.png create mode 100644 examples/iot-dashboard/images/statistics.svg create mode 100644 examples/iot-dashboard/images/storage.png create mode 100644 examples/iot-dashboard/images/storage.svg diff --git a/examples/iot-dashboard/MenuBar.cpp b/examples/iot-dashboard/MenuBar.cpp index 0126d6ef..b78c4cac 100644 --- a/examples/iot-dashboard/MenuBar.cpp +++ b/examples/iot-dashboard/MenuBar.cpp @@ -12,12 +12,14 @@ MenuItem::MenuItem( const QString& name, QQuickItem* parent ) : QskLinearBox( Qt { setAutoLayoutChildren( true ); setAutoAddChildren( true ); + setPreferredWidth( 140 ); QString fileName = ":/images/" + name.toLower() + ".png"; QImage image( fileName ); auto graphic = QskGraphic::fromImage( image ); auto* graphicLabel = new QskGraphicLabel( graphic, this ); - graphicLabel->setFixedSize( 32, 32 ); + graphicLabel->setSizePolicy(QskSizePolicy::Fixed, QskSizePolicy::Fixed); +// graphicLabel->setFixedSize( 32, 32 ); auto* textLabel = new QskTextLabel( name, this ); textLabel->setTextColor( Qt::white ); // ### style @@ -28,12 +30,17 @@ MenuBar::MenuBar( QQuickItem *parent ) : QskLinearBox( Qt::Vertical, parent ) setSizePolicy( QskSizePolicy::Minimum, QskSizePolicy::Preferred ); setAutoLayoutChildren( true ); setAutoAddChildren( true ); - setMargins( 35 ); // ### style - setSpacing( 30 ); // ### style - setBackgroundColor( { 0, 35, 102 } ); // ### style + setBackgroundColor( "#6D7BFB" ); // ### style - m_entries = { "Home", "Details", "Statistics", "Settings" }; + auto* mainIcon = ":/images/main-icon.png"; + QImage image(mainIcon); + auto graphic = QskGraphic::fromImage( image ); + auto* graphicLabel = new QskGraphicLabel( graphic, this ); + graphicLabel->setMargins( { 50, 35, 50, 50 }); + + + m_entries = { "Dashboard", "Rooms", "Devices", "Statistics", "Storage", "Members" }; for( const auto entry : m_entries ) { diff --git a/examples/iot-dashboard/images.qrc b/examples/iot-dashboard/images.qrc index a12a5750..7543c5e6 100644 --- a/examples/iot-dashboard/images.qrc +++ b/examples/iot-dashboard/images.qrc @@ -1,8 +1,12 @@ + images/main-icon.png + images/dashboard.png + images/rooms.png + images/devices.png images/statistics.png - images/settings.png - images/home.png - images/details.png + images/storage.png + images/members.png + images/logout.png diff --git a/examples/iot-dashboard/images/dashboard.png b/examples/iot-dashboard/images/dashboard.png new file mode 100644 index 0000000000000000000000000000000000000000..126322f0a26b87886362d66ed5eff647e6f440a7 GIT binary patch literal 317 zcmeAS@N?(olHy`uVBq!ia0vp^d_c^@!3HFQ8hUO4Db50q$YKTtZeb8+WSBKa0w~B> z9OUlAu9`@T=uc=(D}H>_sPi_%a`HhnG#x z$Xa^a=<*T4b6s`0Tk5jpjAgETpR_0Vh3I^fi*>)3*17Cpe&RCuY)X4}BhYsYp00i_ I>zopr0G9K7YXATM literal 0 HcmV?d00001 diff --git a/examples/iot-dashboard/images/dashboard.svg b/examples/iot-dashboard/images/dashboard.svg new file mode 100644 index 00000000..2cab6f30 --- /dev/null +++ b/examples/iot-dashboard/images/dashboard.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/examples/iot-dashboard/images/details.png b/examples/iot-dashboard/images/details.png deleted file mode 100644 index 77bc34a1fe1f2d3d2eebe92ab70d60a2c2909252..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 375 zcmV--0f_#IP)^@R9J=Wm$6C%K@f(&30sMkMX<2&2`tiSDF|ZcQ`p*D+uBS>_uiB*dX~}xn;P2XO@}U+c8PczyUC5#)|g5%h=2= z+XhJwzy**p?=L&g)qIv3=fgG5a_nSm`^|9C-SuBs{{G4a29V2FDNn${sd*0zz|8JS zbdf12qN?+a2q3HmB;5liPT6PVS8xa%IW-^EQ&2sC1dPd_?dzEI*t{F^9$Z`gAtvb& z*mdeAW_HsyNV)|^&UF?EI0g2c!d$hFfOF?M+k=Qi;Z-WbEAZmf#QluS?5adpJp}{e zQcxT~Rlz5xLa VJvhM;uG#(0r%1aer?9eo`c7&i8E|4C#8@_Rg8978G?=LT}}HW={i5n_43Ak)C2qQI%H zz$nweG@*e-rbpY~=$ISF^gG+OU0)V^R3ez!-+c8PbqEYw8uoN$nmkY}z{)?~QZInVz~JxwYxL(3_Vc=PI&o oTI%PoTwVC4R@d|pci0!{)e3$SvWiw)1Kq{o>FVdQ&MBb@03Yp9dH?_b literal 0 HcmV?d00001 diff --git a/examples/iot-dashboard/images/devices.svg b/examples/iot-dashboard/images/devices.svg new file mode 100644 index 00000000..eaa324dc --- /dev/null +++ b/examples/iot-dashboard/images/devices.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/examples/iot-dashboard/images/home.png b/examples/iot-dashboard/images/home.png deleted file mode 100644 index 82f22fb824ac8639c872075e661e9cab81642dd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1753 zcmd5-Yfuwc7`<5*%t}QGm12uim}at_iV|U}K^p@W!L@PI=@^uf;#yywsq#h;Ws^x; z#jyj}9Y@e$tPTnh9a=5EK-l_#R2r;^fChpX5edTjy`fJ3Dt5|i-9eZlJ zD9nPaX?G|+fjHZXQu0S6kNz}(?=NHxpOayM>jhQo_nK|J;x#{m=2XWdDhQxbcBpuw zJxsTK_IxhMfHDC(E?CZ^fJ~&he3bWAUPnqAg?vBhEJ2X%yGi7aH*~}q$LErIHW55H zxQ_4QgM$a9TPIN;8gye|k{IMm1<#orj6#ppw@I{n87hR-T~3%3Tf%g-h<`g0DUc=K z<=bW1QCWhEN5RdAtk7)h6U$1#K#N^b#Pmdyy8P1d1L>lHW~8IYtc}813rg*fOw<_A z#Tm$!8+O|PhFTxkuubW4M_~&j;6Nl-^ibSU9MBUX(XJ)+zKI~!VjpTD(n19?qgest zdmF%``CKFH!+1Y)DLv1lFpC&$l}u<1=;k!U+F~~zVvev#?x&2FCiOmo+){Hr)X5DX zJc4WQ6Q93=s1 zmwyc;in-}{%u=AFE&kb}DjHTa-*OD~&>M0qAFA{-q3BF`xk}$g0>&txn?h7WR_SL!S>!L3Dt#v}+qW`D)XdA`7IqQR&mq_p z(MCvJP!@USzDmFEJ)OB_V3z`mdk2CQyOv;aiv>zLVS$y9-h#s?cBSF05XK@RZWA}h zPzdh0#r+qc(XDI+mWMXjcR#v#7>zf=K(%-8+&6Aix(QT z@(R=Rl>GYBn{T)^idAh3SD$Eoe9Yu}HO-?twNsrirIfBRh3CA=RMd{Rf5@93F?8ol z(>VQ&THCcVkE=pK&5QHT-HMOK+o@>$4SV8^3*_x83|t)bs!*MLLJY-c4Og4!r|yCc z$W0q#%CnC7Z^%IYYZbm-NnW$LFAchNCf5a%XV6_xc-Tot$HS!ex{LbzTe_#8hd)4_ g4P^DA|0_p_qA65Q?`bQ30{<#NEF)u2FQxSV0)`N&wEzGB diff --git a/examples/iot-dashboard/images/logout.png b/examples/iot-dashboard/images/logout.png new file mode 100644 index 0000000000000000000000000000000000000000..98d7a58031a2e9a96f4a24ecbdccaf1e29686df1 GIT binary patch literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k&H|6fVg?3oVGw3ym^DWND9BhG z+QjG0qa^n+)sudDI$iEQ!f@9~E^%qPSx_ugjLM36(5?r;|KIRzLJDVt>N* zgYEq!7Q4WADrpX)7qtq?9`W7idg8?)#`x(7d&S?&jN-f(=Bf8iJM&|!>b(hDQl$TU s<+nM^8Z&2x(@|rU2a-`0nnG{cre5)1X4c2F3FtNkPgg&ebxsLQ08WHc-2eap literal 0 HcmV?d00001 diff --git a/examples/iot-dashboard/images/logout.svg b/examples/iot-dashboard/images/logout.svg new file mode 100644 index 00000000..05b0bbca --- /dev/null +++ b/examples/iot-dashboard/images/logout.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/examples/iot-dashboard/images/main-icon.png b/examples/iot-dashboard/images/main-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..38e9594bd46114993e5d85c5712ff0906f8da9bc GIT binary patch literal 942 zcmV;f15x~mP)I7*gP&SY=fz=7@PJjZ(#}mX#vSlUh zAHO>sEq(!f1Od`SC!BD?AZ9cH%siJO5t*Z^p3P=8{ZEKdP9zuEayPWT6j@*alW;JD zqU>6VNAisAMAjld@q34E+IA_D;&&}l2&)hDUQiamh+-phcL+0JI*hxcBQe{fB$1*d z&&HETCT#42;nXmt5?Eb_KEY7bD-vm2(_29%e}+#vYqZGYfDba5bJ1KY9Yb#k7?YUq zTVq%_2r2q$c`Z`F6&QypF>|Ff5;F{TQhY((Q&*@^)}&BhdJ(x93MVjXA+jWYP%b*Q z-O(^KWEBJ!;xLhRC{r<$(SDymBjn|;u2T|^7jy3tquLmo{kwMZ(C z|08NkA(~5nk$3tR8~dbruQ&{FR4!3{?t=U7br^T<*A`mSu&|Aeg*PB_8i511o*M5)m7 QHvj+t07*qoM6N<$g4X4v-v9sr literal 0 HcmV?d00001 diff --git a/examples/iot-dashboard/images/main-icon.svg b/examples/iot-dashboard/images/main-icon.svg new file mode 100644 index 00000000..fe502ab6 --- /dev/null +++ b/examples/iot-dashboard/images/main-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/examples/iot-dashboard/images/members.png b/examples/iot-dashboard/images/members.png new file mode 100644 index 0000000000000000000000000000000000000000..f408bb70d3753ae1be878b41db7c1f4c219b542a GIT binary patch literal 322 zcmeAS@N?(olHy`uVBq!ia0vp^d_c_2!3HG#TlXXZDb50q$YP+FFbFd;%$g$s6l5$8 za(7}_cTVOdki(Mh=_$jRwI2rkbhOml&?_jr;ZP-PXO=6*^KQy_N`nU{Q-yW~#EUnG?*B zC?+P?=y6Z-`OdH#3|F$4vR#a-SqK(|dC) zS@+-GaW(&_Y{p96Ed?xDtXB29Pc~^~xfjO2ed1r?`|ch4{uT1~YmalQ`?jv_)AF1O P^df_&tDnm{r-UW|W{i3k literal 0 HcmV?d00001 diff --git a/examples/iot-dashboard/images/members.svg b/examples/iot-dashboard/images/members.svg new file mode 100644 index 00000000..282d0b36 --- /dev/null +++ b/examples/iot-dashboard/images/members.svg @@ -0,0 +1,4 @@ + + + + diff --git a/examples/iot-dashboard/images/rooms.png b/examples/iot-dashboard/images/rooms.png new file mode 100644 index 0000000000000000000000000000000000000000..d193e7a600dcf6b2d8bf5a44f487213a22d5ed34 GIT binary patch literal 275 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa&H|6fVg?3oVGw3ym^DWND9BhG zE=Z literal 0 HcmV?d00001 diff --git a/examples/iot-dashboard/images/rooms.svg b/examples/iot-dashboard/images/rooms.svg new file mode 100644 index 00000000..8ff84cb9 --- /dev/null +++ b/examples/iot-dashboard/images/rooms.svg @@ -0,0 +1,4 @@ + + + + diff --git a/examples/iot-dashboard/images/settings.png b/examples/iot-dashboard/images/settings.png deleted file mode 100644 index b184a885a90d4739bf198cb6bd51355094671e7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 729 zcmV;~0w(>5P)Snrk`_ixqUHE&@!qrRFmvyHZ>A3h-po1Y z`#$bF_uM-)yUFr93;8qjFGt2{rfl|sn4s^H%E~SYTlI>GzqPPpU zVJ9TXfRdy)lJ*pOSHyByr#xd3T;G(<8Q>tW6yf+th!yA{8Pz^40G-u^ zBY~n%M9y^JPJpXF%XKH=LrE(h-q&UpWkAwPPwbFfB6ya86IsCxw%%lXSObPU;(JM&H5N}=l)T&4 zm~~C_W`Idx^Qa~nLKh@0Na~5?lBBW$!;)rl6lK_u^jXOu>ygw}fa79z7=2K4E+2VN zmb9zI%+@7MI)RPG<8HO%>4}`x7oQYm7Eh1UPFs+*R!*dmsY1|F%s5W6?TXazjfu=}bAtVo zHF=~M3q-W$Hx$I(J0@moaEx_L+Jb*~EN*I4_^`Yd|7v&r;)^$G;#r@Wx4n`~)PJ60 Q3UmR3r>mdKI;Vst0D{g%C;$Ke literal 518 zcmV+h0{Q)kP)B(A3r5rsmc(fky*VZ)7`ojK>L=63GA_swMP?TwK_QX8-Z zEC3yZ@dV76*?sOvN%LwBcajP|HQT>^9!`z#ft_SUKCA&l$+!TVN}9^G6OuNQ6}(9r z@D8lURzr58&GG!k%pURxI4Drx38#ch;JpdOy(C-$&BiIwDgmcNGX-8eC6@k5U>kVN z8}z*o1Y>5`k_Le>8ZT^vuRh@~AgKsUIi}Cd>^LRy43r&tRvJC`*?~i#+cCEcbb91) z;v=vQ%sA$%F~z+E%&Y{IVhg!wWgiF=kW`6yEmxuiXz)*=3XfPyu=Z1zv#OSb=?DHc;Rs>kB?-U=>&m6v*V?8ufe}dqX7*raH9R`nZzPwTkvsxjz`3M6 zS2Gv=z)F%cQ{Xl=E&#ic#T${X@k8JU7$xp{?&2LdNNRlY0cO+|E2G>1`Tzg`07*qo IM6N<$g8ux|%K!iX diff --git a/examples/iot-dashboard/images/statistics.svg b/examples/iot-dashboard/images/statistics.svg new file mode 100644 index 00000000..6cb5099c --- /dev/null +++ b/examples/iot-dashboard/images/statistics.svg @@ -0,0 +1,4 @@ + + + + diff --git a/examples/iot-dashboard/images/storage.png b/examples/iot-dashboard/images/storage.png new file mode 100644 index 0000000000000000000000000000000000000000..d9908c96e049cba08e8561cea17c70b572d1ff42 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^d_c_2!3HG#TlXXZDb50q$YP+FFbFd;%$g$s6l5$8 za(7}_cTVOdki(Mh={uPdY=i&&8QHWwlqRD6N#$ugp0= zX~S%8qvX3o&ipIsO8Ih|=Ud!zp2fdT zS1w5Yz;Pn~(&JX93H6slu9%FVdQ&MBb@ E0Hn+a literal 0 HcmV?d00001 diff --git a/examples/iot-dashboard/images/storage.svg b/examples/iot-dashboard/images/storage.svg new file mode 100644 index 00000000..fe78b0e5 --- /dev/null +++ b/examples/iot-dashboard/images/storage.svg @@ -0,0 +1,4 @@ + + + +