From e291cc1941be39170935bab0b706e6f09c127bef Mon Sep 17 00:00:00 2001 From: Syping Date: Wed, 20 May 2020 23:05:00 +0200 Subject: [PATCH] [skip ci] add test engine --- tests/testengine/B.png | Bin 0 -> 1893 bytes tests/testengine/L.png | Bin 0 -> 1719 bytes tests/testengine/OK.png | Bin 0 -> 12672 bytes tests/testengine/R.png | Bin 0 -> 1903 bytes tests/testengine/U.png | Bin 0 -> 1350 bytes tests/testengine/testengine.lua | 154 ++++++++++++++++++++++++++++++++ 6 files changed, 154 insertions(+) create mode 100644 tests/testengine/B.png create mode 100644 tests/testengine/L.png create mode 100644 tests/testengine/OK.png create mode 100644 tests/testengine/R.png create mode 100644 tests/testengine/U.png create mode 100644 tests/testengine/testengine.lua diff --git a/tests/testengine/B.png b/tests/testengine/B.png new file mode 100644 index 0000000000000000000000000000000000000000..af372e3e124af5b560d27343b4dd75253044a13e GIT binary patch literal 1893 zcmc&!`#Td18(x{-MrEPVJBN+Qp$RSIFpOd3uq`Wd3OOZT<(Jx=Tr_kz4|M@=eq9azV4sy>$$Jzc@pss)IljS%N?y2?+@>7%V9% zDJ?Axfk0$rWKNzu357!C7efl&KiPY58JaguZmX?;bwziIr&e^kPQ7F{8bLVt*b@lZ0^!4@6pFeM4 zU|?uyXk=t$Y;251qfJaqOifKO7>v2OxrK!V7K^pCw6wCa!r^c>Ha51lwihm3u(PwX zx3_n2aBy^V#N+V<0)a>*Uc7kG$;pXCB3-_G+1c5dOeVXyxVXByy1BWzySsaMcwD)1 z#naQ%%gf8#+uO&-$Jf`_&(F`_-#;KA;M%oofq{WRK|wcf-V6>7rcfv$At9lmpK_O$H(8fbLZ~ey9o&iiHV8# z?%hjDN=i;nPDx2gO-)TtPtVB6$jr>VfB$|~R#tX)c1})CZfy`SYr(s_N?Mnwpy0+S->dU)I&t)z{ZI zG&C?6jK;>srlzLm=H^$gUNM=>*RNlf6-Mjbi-+%bAFT zW@cw+=jP_-=jRs|7KB3K;^N}c($ezs^2*A}>gwu`A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Ur?>fg7lwO9v84|w4xFHe z4hS86a@l5Fc18S+0Z@iHV2iKoe656ZB`e(DD6P`De$|lR*q}#s#2k{wy*1-#pAw|$ zQCJ<@Ui0Gx6oD1mT(WwiZ?H{+(vXrOq7Je8H zW`+-)L2E9==-!fLv|2HDe0??}6|O=t_ott!`s9?cyhktSSQxv+CaI&Ih-@~OM$xDE zo+1fHH*Y~0Q8B?}`u}Wf%_ks2Rz0m~&cgV~W`Wl(*1OhwIe3qcv^->TSXv(N=c2xT zL2G}ycz|pUQw_X>mqcdy!}-MED&#L(;VM9Dr$WT~+#H@-3fDy%U1EI)ysOW%{qPU} zli{!VfI)l`=)Wv*?YCy=ky(<1JDMggf>P=ZG<9n5$qhosMLxy3Af5pT$?SPWXGdFR zo5L-c-QKwZ{5O1?Arvb+ufYD?aS**zYC$x*K^$ipa)dWuOnG^33~ENs2#GZ`abM!d znGwrl=a(B4c$L$8|K2pCZbdgbJJ0kdEb#3&K07 z-VDv+LclT0X3SAHkND-M)aCs~M1>0%O41txL%KPn8~KA&J?Y+p;fmh7puyDa6;EMmD4 P{oPACFav0{Ivn*skt}5+ literal 0 HcmV?d00001 diff --git a/tests/testengine/U.png b/tests/testengine/U.png new file mode 100644 index 0000000000000000000000000000000000000000..428d49ad19457f345ad0e7dc9955758766a5d3bf GIT binary patch literal 1350 zcmV-M1-bf(P)00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!T=X<_;t&KeYSf5{ z^E~T)ID2up&AEHbjY6L0=;zsMuXlap+TmYcUtvF)2=VWaB_tr&gaibekbqzl5)f=c z0<`k_`ntBZ=61W^-`|Bv6Y>Ih!SV6&^YgQ@Q(+T`=g_y z4u|9I?M;}B01sSWUvF$|_)Vuwb{_d8IHJfz@iY*=&Bl-|O`XlO_~} z(9_eC;UN?sAD^F}|M~eD@EiybQBhHGadG@`etxdUw@L+Y{Kk5K-CHb{n3$OD?QH@{ zSk)shAUr%gGBT13#@)hX1T0%pQc_S*u(!8&a&jW9>X8=^9UW~lnI0YMwLMIJyvAUqHe5y8qtrk?DQ z7Z4j8OUXk3l~kCFgG|s_8{`F0E)o(F2qC(GFnuQ!2_RSzK(GqacS2qO@q++%ABYgr zkGuflCp9&d`1z?Jga;5nx7Snb0*AZ+$|xa3vAeswGj^f|mZcDhUo;^vfEN%&6l|t0 zW1Yb6$t$`62$OmgJ&6D~J3GS(!ej(oXiiU0S(zvmCiN&1kd%~^oSe+ia(jC#Oh$l9 z8RN3DvKWelNj*vhq@|_d0lI-O83ARD1*s5;iHX9b9z_Du)6;Wva}mJp-oRS{OOXc5 z>U#26k${YhjPmkwDk+x_W1~nviUd%Cii?X$gTuo^0#{hS2Z{v1U%w!ajZFihDByiS zf}xsJGj<{(Ch3f<%mrVV)T2}Y{g|WJpN|K+DjI}U z6DkDYYqQzxcDs4E&VhncSY2JEhE`Nm=$Yg|g@D4s!kU^I@|bt)sYN(&YHDhEdD&vI zupk9m{6P~c1W-wvnwoIJ($doU`ns^H0l!fI#>dAeCnrBXJ~}!&s;jI2r%nvKiIJ|h zwwBo4+S*c8Or@ zkCUcc^2p5043R_lQOdfyy88P1lsqnr>MwgFaesgR?(S||TU&2$uhnY((*k8)^$P z!p_dl%F4>z+#L0uTMJunZEa=WWo2b#5e-rL&-&5wZIz?tP^YJ-IaiuPV`C%dDisst zaZhL5a5|l|Jo5hUU)XH6%F0STBg3E2_;Hwx64?_I6SK3kG*qHU`ZPks^CyBkFE6jT zxw*c+zM-LkN^dfmqz4U0``2wAZ-n0q)6(Ug>6?-v9sr07*qo IM6N<$g7w5@Qvd(} literal 0 HcmV?d00001 diff --git a/tests/testengine/testengine.lua b/tests/testengine/testengine.lua new file mode 100644 index 0000000..de1be32 --- /dev/null +++ b/tests/testengine/testengine.lua @@ -0,0 +1,154 @@ +#!/usr/bin/env luaengine +--[[ +****************************************************************************** +* luaEngine Lua Engine for Qt +* Copyright (C) 2020 Syping +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +****************************************************************************** +--]] + +local stackSwitch +local mainWindow +local itemStack = {} + +function main() + -- Window + mainWindow = createMainWindow("LE Test Engine") + local mainLayout = createLayout(VerticalLayout, mainWindow) + + -- Menu + local menuBar = createMenuBar(mainWindow) + local menuFile = createMenu("&File", menuBar) + local menuEntryExit = createMenuEntry("&Exit", menuFile, "Alt+F4") + connect(menuEntryExit, "triggered()", "testEngineClose") + local menuHelp = createMenu("&Help", menuBar) + local menuEntryAbout = createMenuEntry("&About LE Test Engine", menuHelp, "Ctrl+P") + connect(menuEntryAbout, "triggered()", "testEngineAboutBox") + + -- Toolbar + local toolBar = createToolBar("Toolbar", mainWindow) + setWidgetImageSize(toolBar, 24, 24) + local leftButton = createMenuEntry("Left", toolBar) + setObjectImage(leftButton, "L.png") + local rightButton = createMenuEntry("Right", toolBar) + setObjectImage(rightButton, "R.png") + + -- Tabbar + local tabBar = createTabBar(mainLayout) + + -- Main Tab + local groupBox = createGroupBox("Buttons in Layouts", tabBar) + addWidgetAsTab(groupBox, "Main Tab", tabBar) + local groupBoxLayout1 = createLayout(HorizontalLayout, groupBox) + local groupBoxLayout2 = createLayout(VerticalLayout, groupBoxLayout1) + local testButton1 = createPushButton("Test 1", groupBoxLayout2) + setObjectImage(testButton1, "L.png") + local testButton2 = createPushButton("Test 2", groupBoxLayout2) + local testButton3 = createPushButton("Test 3", groupBoxLayout1) + local testButton4 = createPushButton("Test 4", groupBoxLayout1) + local groupBoxLayout3 = createLayout(VerticalLayout, groupBoxLayout1) + local testButton5 = createPushButton("Test 5", groupBoxLayout3) + setObjectImage(testButton5, "R.png") + local testButton6 = createPushButton("Test 6", groupBoxLayout3) + + -- Secondary Tab + local secondaryTab = createWidgetTab("Secondary Tab", tabBar) + local secondaryTabLayout = createLayout(VerticalLayout, secondaryTab) + createLabel("The Secondary Tab is here!", secondaryTabLayout) + local imagesLayout = createLayout(HorizontalLayout, secondaryTabLayout) + createSpacerItem(SizePolicyExpanding, SizePolicyMinimum, imagesLayout) + local leftImage = createLabel("!image:L.png", imagesLayout, 2) + createLabel("Left", imagesLayout) + createSpacerItem(SizePolicyExpanding, SizePolicyMinimum, imagesLayout) + local rightImage = createLabel("!image:R.png", imagesLayout, 2) + createLabel("Right", imagesLayout) + createSpacerItem(SizePolicyExpanding, SizePolicyMinimum, imagesLayout) + + -- Last Tab + local lastTab = createWidgetTab("Last Tab", tabBar) + local lastTabLayout = createLayout(HorizontalLayout, lastTab) + local listView = createListView(lastTabLayout) + setWidgetImageSize(listView, 24, 24) + setWidgetSizePolicy(listView, SizePolicyPreferred, SizePolicyExpanding) + + -- Last Tab: Upper Item + local upperItem = createListItem("Upper", listView) + setObjectImage(upperItem, "U.png") + connect(upperItem, "selected()", "itemSelected") + + -- Last Tab: Bottom Item + local bottomItem = createListItem("Bottom", listView) + setObjectImage(bottomItem, "B.png") + connect(bottomItem, "selected()", "itemSelected") + + -- Last Tab: Stack Switch + stackSwitch = createStackSwitch(lastTabLayout) + + -- Stack Switch: Upper Stack + local upperStack = createWidgetStack(stackSwitch) + local upperLayout = createLayout(VerticalLayout, upperStack) + createSpacerItem(SizePolicyMinimum, SizePolicyExpanding, upperLayout) + local upperLabel = createLabel("Upper Label is here!", upperLayout) + local upperImage = createLabel("!image:U.png", upperLayout, 2) + createSpacerItem(SizePolicyMinimum, SizePolicyExpanding, upperLayout) + itemStack[upperItem] = upperStack + + -- Stack Switch: Bottom Stack + local bottomStack = createWidgetStack(stackSwitch) + local bottomLayout = createLayout(VerticalLayout, bottomStack) + createSpacerItem(SizePolicyMinimum, SizePolicyExpanding, bottomLayout) + local bottomLabel = createLabel("Bottom Label is here!", bottomLayout) + local bottomImage = createLabel("!image:B.png", bottomLayout, 2) + createSpacerItem(SizePolicyMinimum, SizePolicyExpanding, bottomLayout) + itemStack[bottomItem] = bottomStack + + -- Show Window + setWidgetSize(mainWindow, 650, 450) + showWidget(mainWindow, ShowDefault) + return GuiExecuted +end + +function itemSelected(item) + setCurrentStack(itemStack[item], stackSwitch) +end + +function testEngineAboutBox() + -- Dialog + local dialog = createDialog("About LE Test Engine", mainWindow) + local dialogLayout = createLayout(VerticalLayout, dialog) + + -- Dialog Label + local dialogLabel = createLabel("

LE Test Engine

Lua Engine Testing Ground", dialogLayout) + + -- Button Layout + local buttonLayout = createLayout(HorizontalLayout, dialogLayout) + createSpacerItem(SizePolicyExpanding, SizePolicyMinimum, buttonLayout) + local dialogButton = createPushButton("&OK", buttonLayout) + setObjectImage(dialogButton, "OK.png") + connect(dialogButton, "clicked()", "closeDialog") + + -- Show Dialog + setWidgetFixed(dialog) + executeWidget(dialog) + delete(dialog, DeleteInstant) -- preventing memory leaks +end + +function testEngineClose() + closeWidget(mainWindow) +end + +function closeDialog(pushButton) + disconnect(pushButton, "clicked()") + closeWidget(getObjectWindow(pushButton)) +end