2 import QtQuick.Controls 1.2
3 import QtQuick.Window 2.1
5 import QtQuick.Layouts 1.1
12 //SystemPalette { id: palette }
17 //This window is our VFD frame
22 title: "Splash Window"
24 flags: Qt.SplashScreen
25 property int timeoutInterval: 41
27 //! [splash-properties]
28 //! [screen-properties]
29 //x: (Screen.width - rectangleScreen.width) / 2
30 //y: (Screen.height - rectangleScreen.height) / 2
31 x: appWindow.x+appWindow.width-256-13
32 y: appWindow.y+appWindow.height-64-30
34 //! [screen-properties]
35 width: rectangleScreen.width
36 height: rectangleScreen.height
37 property int frameCounter:0;
38 property var startTime:new Date();
42 anchors.centerIn: parent
68 text: "Time/Frame (ms):"
110 interval: splash.timeoutInterval; running: true; repeat: true
114 var current = new Date();
115 var milliseconds = (current.getTime() - splash.startTime.getTime());
117 splash.frameCounter++;
118 labelFrameCount.text=splash.frameCounter;
119 labelTime.text=milliseconds/1000;
120 labelTimePerFrame.text=(milliseconds/splash.frameCounter).toFixed(3);
121 labelFps.text=(1000/(milliseconds/splash.frameCounter)).toFixed(0);
123 if (checkBoxDoClear.checked)
128 if (checkBoxRenderToDisplay.checked)
130 if (checkBoxFillOnly.checked)
134 else if (checkBoxOnePixelOnly.checked)
136 display.setPixel(0,0,splash.frameCounter%2);
140 display.renderWindow(splash);
143 if (!checkBoxNoSwapBuffers.checked)
145 display.swapBuffers();
156 Component.onCompleted: {
168 text: qsTr("Render Window")
170 display.renderWindow(splash);
171 display.swapBuffers();
176 text: qsTr("Reset stats")
178 splash.startTime = new Date();
179 splash.frameCounter = 0;
184 text: qsTr("Run timer")
187 (checked?timer.start():timer.stop())
193 text: qsTr("Do clear")
198 id: checkBoxRenderToDisplay
199 text: qsTr("Render to display")
205 text: qsTr("Fill only")
210 id: checkBoxNoSwapBuffers
211 text: qsTr("No swap buffers")
216 id: checkBoxOnePixelOnly
217 text: qsTr("One pixel only")
222 //id: checkBoxOnePixelOnly
223 text: qsTr("Off-Screen")
225 onCheckedChanged: {display.offScreenMode = checked;}