diff options
author | Krunal Bhargav | 2022-04-27 09:01:49 -0500 |
---|---|---|
committer | Krunal Bhargav | 2022-05-04 16:33:33 -0500 |
commit | c0d638776e7a3eb2d3d190ff8ac883622760cf23 (patch) | |
tree | 59b73f2c2e8449dbc7b66e6c9fe35a4433f38c13 | |
download | hmi-demo-c0d638776e7a3eb2d3d190ff8ac883622760cf23.tar.gz hmi-demo-c0d638776e7a3eb2d3d190ff8ac883622760cf23.tar.xz hmi-demo-c0d638776e7a3eb2d3d190ff8ac883622760cf23.zip |
AM62 HMI demo: Inital Commit
Signed-off-by: Krunal Bhargav <k-bhargav@ti.com>
-rw-r--r-- | LICENSE | 206 | ||||
-rw-r--r-- | hmi_demo.pro | 30 | ||||
-rw-r--r-- | images/3D_with_text.png | bin | 0 -> 1072 bytes | |||
-rw-r--r-- | images/Analytics_with_text.png | bin | 0 -> 1984 bytes | |||
-rw-r--r-- | images/Background.png | bin | 0 -> 248121 bytes | |||
-rw-r--r-- | images/Bottom_Right_Box.png | bin | 0 -> 6659 bytes | |||
-rw-r--r-- | images/Center_Box.png | bin | 0 -> 17769 bytes | |||
-rw-r--r-- | images/Control_Panel_with_text.png | bin | 0 -> 2350 bytes | |||
-rw-r--r-- | images/Minux_Box.png | bin | 0 -> 737 bytes | |||
-rw-r--r-- | images/Motor_Temp.png | bin | 0 -> 6769 bytes | |||
-rw-r--r-- | images/Off_Button.png | bin | 0 -> 6014 bytes | |||
-rw-r--r-- | images/On_Button.png | bin | 0 -> 6032 bytes | |||
-rw-r--r-- | images/Plus_Box.png | bin | 0 -> 823 bytes | |||
-rw-r--r-- | images/Rectangle.png | bin | 0 -> 879 bytes | |||
-rw-r--r-- | images/Repeat_Grid.png | bin | 0 -> 3596 bytes | |||
-rw-r--r-- | images/Status_Message.png | bin | 0 -> 7571 bytes | |||
-rw-r--r-- | images/Texas_Instrument.png | bin | 0 -> 5308 bytes | |||
-rw-r--r-- | images/Top_Righ_Box.png | bin | 0 -> 6520 bytes | |||
-rw-r--r-- | images/servo-drives-icon.png | bin | 0 -> 3497 bytes | |||
-rw-r--r-- | main.cpp | 20 | ||||
-rw-r--r-- | main.qml | 721 | ||||
-rw-r--r-- | qml.qrc | 22 |
22 files changed, 999 insertions, 0 deletions
@@ -0,0 +1,206 @@ | |||
1 | Texas Instruments Incorporated | ||
2 | Technology and Software Publicly Available | ||
3 | Software License Agreement | ||
4 | |||
5 | |||
6 | Important - Please read the following license agreement carefully. This is | ||
7 | a legally binding agreement. Do not click "i have read and agree" or use | ||
8 | (as applicable) the Licensed Materials unless: (1) you are authorized to | ||
9 | accept and agree to the terms of this license agreement on behalf of | ||
10 | yourself or your company (as applicable) and (2) you intend to be bound by | ||
11 | the terms of this license agreement on behalf of yourself or your company | ||
12 | (as applicable). | ||
13 | |||
14 | This Software License Agreement ("Agreement") is a legal agreement between | ||
15 | you (either an individual or entity) and Texas Instruments Incorporated | ||
16 | ("TI"), 12500 TI Boulevard, Dallas, Texas 75243. The "Licensed Materials" | ||
17 | subject to this Agreement include the software programs (in whole or in | ||
18 | part), that accompany this Agreement and set forth in the applicable | ||
19 | software manifest and which you access "on-line" and/or electronic | ||
20 | documentation (in whole or in part) associated and provided with these | ||
21 | software programs. By installing, copying or otherwise using the Licensed | ||
22 | Materials you agree to abide by the terms of this Agreement. If you choose | ||
23 | not to accept or agree with these terms, do not download or install the | ||
24 | Licensed Materials. | ||
25 | |||
26 | Note Regarding Possible Access to Open Source Software: The Licensed | ||
27 | Materials may be bundled with Open Source Software. "Open Source Software" | ||
28 | means any software licensed under terms requiring that (A) other software | ||
29 | ("Proprietary Software") incorporated, combined or distributed with such | ||
30 | software or developed using such software: (i) be disclosed or distributed | ||
31 | in source code form; or (ii) otherwise be licensed on terms inconsistent | ||
32 | with the terms of this Agreement, including but not limited to permitting | ||
33 | use of the Proprietary Software on or with devices other than TI Devices, or | ||
34 | (B) require the owner of Proprietary Software to license any of its patents | ||
35 | to users of the Open Source Software and/or Proprietary Software | ||
36 | incorporated, combined or distributed with such Open Source Software or | ||
37 | developed using such Open Source Software. | ||
38 | |||
39 | You may gain access to Open Source Software, in which case such Open Source | ||
40 | Software will be listed in the applicable software manifest (in whole or in | ||
41 | part, the "Open Source Materials"). Your use of the Open Source Materials | ||
42 | is subject to the separate licensing terms applicable to such Open Source | ||
43 | Materials as specified in the applicable software manifest. For | ||
44 | clarification, this Agreement does not limit your rights under, or grant you | ||
45 | rights that supersede, the license terms of any applicable Open Source | ||
46 | Materials license agreement. If any of the Open Source Materials have been | ||
47 | provided to you in object code only, TI will provide to you or show you | ||
48 | where can access the source code versions of such Open Source Materials if | ||
49 | you contact TI at Texas Instruments Incorporated, 12500 TI Boulevard, Mail | ||
50 | Station 8638, Dallas, Texas 75243, Attention: Contracts Manager. You may | ||
51 | terminate this Agreement in the event you choose not to accept or agree with | ||
52 | the terms in any applicable Open Source Materials license agreement, | ||
53 | provided that such termination occurs within five (5) calendar days of | ||
54 | acceptance of this Agreement and you abide by all applicable license terms | ||
55 | in this Agreement until such termination. | ||
56 | |||
57 | 1. License. | ||
58 | |||
59 | a. Source Code License. For the Licensed Materials provided in source code | ||
60 | format, TI hereby grants to you a limited, non-exclusive license to | ||
61 | reproduce, use, and create modified or derivative works of the Licensed | ||
62 | Materials provided to you in source code format and to distribute an | ||
63 | unlimited number of copies of such source code Licensed Materials, or any | ||
64 | derivatives thereof, in any format. | ||
65 | |||
66 | b. Object Code License. For the Licensed Materials provided in object code | ||
67 | format, TI hereby grants to you a limited, non-exclusive license to | ||
68 | reproduce and use the Licensed Materials provided to you in object code | ||
69 | format and to distribute an unlimited number of object or executable copies | ||
70 | of such object code Licensed Materials. | ||
71 | |||
72 | 2. Termination. This Agreement is effective until terminated. Without | ||
73 | prejudice to any other rights, TI may terminate your right to use the | ||
74 | Licensed Materials under this Agreement if you fail to comply with the terms | ||
75 | of this Agreement. In such event, you shall destroy all copies of the | ||
76 | Licensed Materials, including all portions and derivatives thereof. | ||
77 | |||
78 | 3. Intellectual Property Rights. | ||
79 | |||
80 | a. The Licensed Materials being provided to you hereunder are being made | ||
81 | publicly available by TI, even though they contain copyrighted material of | ||
82 | TI and its licensors, if applicable. In no event may you alter, remove or | ||
83 | destroy any copyright notice included in the Licensed Materials. To the | ||
84 | extent that any of the Licensed Materials are provided in binary or object | ||
85 | code only, you may not unlock, decompile, reverse engineer, disassemble or | ||
86 | otherwise translate such binary or object code to human-perceivable form. | ||
87 | The source code of such reverse engineered code may contain TI trade secret | ||
88 | and other proprietary information. TI reserves all rights not specifically | ||
89 | granted under this Agreement. | ||
90 | |||
91 | b. Certain Licensed Materials may (i) require patent licenses from third | ||
92 | parties claiming patent rights covering implementation of the Licensed | ||
93 | Materials or (ii) be based on industry recognized standards or software | ||
94 | programs published by industry recognized standards bodies and certain third | ||
95 | parties may claim to own patents or copyrights that cover implementation of | ||
96 | those standards. You acknowledge and agree that this Agreement does not | ||
97 | convey a license to any such third party patents and copyrights. | ||
98 | |||
99 | c. YOU ACKNOWLEDGE AND AGREE THAT TI SHALL NOT BE LIABLE FOR AND SHALL NOT | ||
100 | DEFEND OR INDEMNIFY YOU AGAINST ANY THIRD PARTY INFRINGEMENT CLAIM THAT | ||
101 | RELATES TO OR IS BASED ON YOUR MANUFACTURE, USE, OR DISTRIBUTION OF THE | ||
102 | LICENSED MATERIALS OR YOUR MANUFACTURE, USE, OFFER FOR SALE, SALE, | ||
103 | IMPORTATION OR DISTRIBUTION OF YOUR PRODUCTS THAT INCLUDE OR INCORPORATE THE | ||
104 | LICENSED MATERIALS. | ||
105 | |||
106 | d. You acknowledge and agree that you are responsible for any fees or | ||
107 | royalties that may be payable to any third party based on such third party's | ||
108 | interests in the Licensed Materials described in Section 3(b) above (the | ||
109 | "Third Party Payment Obligations"). You agree to indemnify TI against any | ||
110 | Third Party Payment Obligations and will defend any claim, suit or | ||
111 | proceeding brought against TI insofar as such claim, suit or proceeding is | ||
112 | based on your failure to pay any Third Party Payment Obligations. | ||
113 | |||
114 | 4. Warranties and Limitations. THE LICENSED MATERIALS ARE PROVIDED "AS IS". | ||
115 | TI AND ITS LICENSORS MAKE NO WARRANTY OR REPRESENTATION, EXPRESS, IMPLIED OR | ||
116 | STATUTORY, INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTIBILITY, FITNESS FOR | ||
117 | A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS OF | ||
118 | RESPONSES, RESULTS AND LACK OF NEGLIGENCE. TI DISCLAIMS ANY WARRANTY OF | ||
119 | TITLE, QUIET ENJOYMENT, QUIET POSESSION, AND NON-INFRINGEMENT OF ANY THIRD | ||
120 | PARTY INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE LICENSED MATERIALS OR | ||
121 | USE OF THOSE MATERIALS. | ||
122 | |||
123 | YOU ACKNOWLEDGE AND AGREE THAT THE LICENSED MATERIALS MAY NOT BE INTENDED | ||
124 | FOR PRODUCTION APPLICATIONS AND MAY CONTAIN IRREGULARITIES AND DEFECTS NOT | ||
125 | FOUND IN PRODUCTION SOFTWARE. FURTHERMORE, YOU ACKNOWLEDGE AND AGREE THAT | ||
126 | THE LICENSED MATERIALS HAVE NOT BEEN TESTED OR CERTIFIED BY ANY GOVERNMENT | ||
127 | AGENCY OR INDUSTRY REGULATORY ORGANIZATION OR ANY OTHER THIRD PARTY | ||
128 | ORGANIZATION. YOU AGREE THAT PRIOR TO USING, INCORPORATING OR DISTRIBUTING | ||
129 | THE LICENSED MATERIALS IN OR WITH ANY COMMERCIAL PRODUCT THAT YOU WILL | ||
130 | THOROUGHLY TEST THE PRODUCT AND THE FUNCTIONALITY OF THE LICENSED MATERIALS | ||
131 | IN OR WITH THAT PRODUCT AND BE SOLELY RESPONSIBLE FOR ANY PROBLEMS OR | ||
132 | FAILURES. | ||
133 | |||
134 | IN NO EVENT SHALL TI OR ITS LICENSORS BE LIABLE FOR ANY SPECIAL, INDIRECT, | ||
135 | INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED ON ANY THEORY | ||
136 | OF LIABILITY, ARISING IN ANY WAY OUT OF THIS AGREEMENT, OR YOUR USE OF THE | ||
137 | LICENSED MATERIALS, WHETHER OR NOT TI HAS BEEN ADVISED OF THE POSSIBILITY OF | ||
138 | SUCH DAMAGES. EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, COST OF | ||
139 | REMOVAL OR REINSTALLATION, OUTSIDE COMPUTER TIME, LABOR COSTS, LOSS OR | ||
140 | CORRUPTION OF DATA, LOSS OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR | ||
141 | LOSS OF USE OR INTERRUPTION OF BUSINESS OR ANY OTHER ECONOMIC LOSS. IN NO | ||
142 | EVENT WILL TI'S AGGREGATE LIABILITY UNDER THIS AGREEMENT OR ARISING OUT OF | ||
143 | YOUR USE OF THE LICENSED MATERIALS EXCEED FIVE HUNDRED U.S. DOLLARS | ||
144 | (US$500). | ||
145 | |||
146 | Because some jurisdictions do not allow the exclusion or limitation of | ||
147 | incidental or consequential damages or limitation on how long an implied | ||
148 | warranty lasts, the above limitations or exclusions may not apply to you. | ||
149 | |||
150 | 5. Export Control. The Licensed Materials may be subject to the export or | ||
151 | import regulations of certain countries. You agree to comply with all such | ||
152 | regulations and acknowledge that you have the responsibility to obtain any | ||
153 | licenses or other authorizations that may be required to export, re-export | ||
154 | or import the Licensed Materials. | ||
155 | |||
156 | 6. Governing Law, Jurisdiction and Severability. This Agreement will be | ||
157 | governed by and interpreted in accordance with the laws of the State of | ||
158 | Texas, without reference to conflict of laws principles. If for any reason | ||
159 | a court of competent jurisdiction finds any provision of the Agreement to be | ||
160 | unenforceable, that provision will be enforced to the maximum extent | ||
161 | possible to effectuate the intent of the parties and the remainder of the | ||
162 | Agreement shall continue in full force and effect. This Agreement shall not | ||
163 | be governed by the United Nations Convention on Contracts for the | ||
164 | International Sale of Goods, or by the Uniform Computer Information | ||
165 | Transactions Act (UCITA). The parties agree that non-exclusive jurisdiction | ||
166 | for any dispute arising out of or relating to this Agreement lies within the | ||
167 | courts located in the State of Texas. Notwithstanding the foregoing, any | ||
168 | judgment may be enforced in any United States or foreign court, and either | ||
169 | party may seek injunctive relief in any United States or foreign court. | ||
170 | Failure by TI to enforce any provision of this Agreement shall not be deemed | ||
171 | a waiver of future enforcement of that or any other provision in this | ||
172 | Agreement or any other agreement that may be in place between the parties. | ||
173 | |||
174 | 7. PRC Provisions. If you are located in the People's Republic of China | ||
175 | ("PRC") or if the Licensed Materials will be sent to the PRC, the following | ||
176 | provisions shall apply: | ||
177 | |||
178 | a. Registration Requirements. You shall be solely responsible for | ||
179 | performing all acts and obtaining all approvals that may be required in | ||
180 | connection with this Agreement by the government of the PRC, including but | ||
181 | not limited to registering pursuant to, and otherwise complying with, the | ||
182 | PRC Measures on the Administration of Software Products, Management | ||
183 | Regulations on Technology Import-Export, and Technology Import and Export | ||
184 | Contract Registration Management Rules. Upon receipt of such approvals from | ||
185 | the government authorities, you shall forward evidence of all such approvals | ||
186 | to TI for its records. In the event that you fail to obtain any such | ||
187 | approval or registration, you shall be solely responsible for any and all | ||
188 | losses, damages or costs resulting therefrom, and shall indemnify TI for all | ||
189 | such losses, damages or costs. | ||
190 | |||
191 | b. Governing Language. This Agreement is written and executed in the | ||
192 | English language. If a translation of this Agreement is required for any | ||
193 | purpose, including but not limited to registration of the Agreement pursuant | ||
194 | to any governmental laws, regulations or rules, you shall be solely | ||
195 | responsible for creating such translation. Any translation of this | ||
196 | Agreement into a language other than English is intended solely in order to | ||
197 | comply with such laws or for reference purposes, and the English language | ||
198 | version shall be authoritative and controlling. | ||
199 | |||
200 | 8. Entire Agreement. This is the entire agreement between you and TI and | ||
201 | supersedes any prior agreement between the parties related to the subject | ||
202 | matter of this Agreement. No amendment or modification of this Agreement | ||
203 | will be effective unless in writing and signed by a duly authorized | ||
204 | representative of TI. You hereby warrant and represent that you have | ||
205 | obtained all authorizations and other applicable consents required | ||
206 | empowering you to enter into this Agreement. | ||
diff --git a/hmi_demo.pro b/hmi_demo.pro new file mode 100644 index 0000000..879b4d1 --- /dev/null +++ b/hmi_demo.pro | |||
@@ -0,0 +1,30 @@ | |||
1 | QT += quick | ||
2 | |||
3 | CONFIG += c++11 | ||
4 | |||
5 | # The following define makes your compiler emit warnings if you use | ||
6 | # any Qt feature that has been marked deprecated (the exact warnings | ||
7 | # depend on your compiler). Refer to the documentation for the | ||
8 | # deprecated API to know how to port your code away from it. | ||
9 | DEFINES += QT_DEPRECATED_WARNINGS | ||
10 | |||
11 | # You can also make your code fail to compile if it uses deprecated APIs. | ||
12 | # In order to do so, uncomment the following line. | ||
13 | # You can also select to disable deprecated APIs only up to a certain version of Qt. | ||
14 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 | ||
15 | |||
16 | SOURCES += \ | ||
17 | main.cpp | ||
18 | |||
19 | RESOURCES += qml.qrc | ||
20 | |||
21 | # Additional import path used to resolve QML modules in Qt Creator's code model | ||
22 | QML_IMPORT_PATH = | ||
23 | |||
24 | # Additional import path used to resolve QML modules just for Qt Quick Designer | ||
25 | QML_DESIGNER_IMPORT_PATH = | ||
26 | |||
27 | # Default rules for deployment. | ||
28 | qnx: target.path = /tmp/$${TARGET}/bin | ||
29 | else: unix:!android: target.path = /opt/$${TARGET}/bin | ||
30 | !isEmpty(target.path): INSTALLS += target | ||
diff --git a/images/3D_with_text.png b/images/3D_with_text.png new file mode 100644 index 0000000..cbe10bb --- /dev/null +++ b/images/3D_with_text.png | |||
Binary files differ | |||
diff --git a/images/Analytics_with_text.png b/images/Analytics_with_text.png new file mode 100644 index 0000000..30f67b9 --- /dev/null +++ b/images/Analytics_with_text.png | |||
Binary files differ | |||
diff --git a/images/Background.png b/images/Background.png new file mode 100644 index 0000000..fb0ea53 --- /dev/null +++ b/images/Background.png | |||
Binary files differ | |||
diff --git a/images/Bottom_Right_Box.png b/images/Bottom_Right_Box.png new file mode 100644 index 0000000..3272477 --- /dev/null +++ b/images/Bottom_Right_Box.png | |||
Binary files differ | |||
diff --git a/images/Center_Box.png b/images/Center_Box.png new file mode 100644 index 0000000..c05bb7f --- /dev/null +++ b/images/Center_Box.png | |||
Binary files differ | |||
diff --git a/images/Control_Panel_with_text.png b/images/Control_Panel_with_text.png new file mode 100644 index 0000000..ce0523e --- /dev/null +++ b/images/Control_Panel_with_text.png | |||
Binary files differ | |||
diff --git a/images/Minux_Box.png b/images/Minux_Box.png new file mode 100644 index 0000000..c114a8f --- /dev/null +++ b/images/Minux_Box.png | |||
Binary files differ | |||
diff --git a/images/Motor_Temp.png b/images/Motor_Temp.png new file mode 100644 index 0000000..e1f6b01 --- /dev/null +++ b/images/Motor_Temp.png | |||
Binary files differ | |||
diff --git a/images/Off_Button.png b/images/Off_Button.png new file mode 100644 index 0000000..8c74ee2 --- /dev/null +++ b/images/Off_Button.png | |||
Binary files differ | |||
diff --git a/images/On_Button.png b/images/On_Button.png new file mode 100644 index 0000000..4500f3d --- /dev/null +++ b/images/On_Button.png | |||
Binary files differ | |||
diff --git a/images/Plus_Box.png b/images/Plus_Box.png new file mode 100644 index 0000000..49f951f --- /dev/null +++ b/images/Plus_Box.png | |||
Binary files differ | |||
diff --git a/images/Rectangle.png b/images/Rectangle.png new file mode 100644 index 0000000..c6fa740 --- /dev/null +++ b/images/Rectangle.png | |||
Binary files differ | |||
diff --git a/images/Repeat_Grid.png b/images/Repeat_Grid.png new file mode 100644 index 0000000..78665b0 --- /dev/null +++ b/images/Repeat_Grid.png | |||
Binary files differ | |||
diff --git a/images/Status_Message.png b/images/Status_Message.png new file mode 100644 index 0000000..229be0c --- /dev/null +++ b/images/Status_Message.png | |||
Binary files differ | |||
diff --git a/images/Texas_Instrument.png b/images/Texas_Instrument.png new file mode 100644 index 0000000..6949679 --- /dev/null +++ b/images/Texas_Instrument.png | |||
Binary files differ | |||
diff --git a/images/Top_Righ_Box.png b/images/Top_Righ_Box.png new file mode 100644 index 0000000..aa6baf2 --- /dev/null +++ b/images/Top_Righ_Box.png | |||
Binary files differ | |||
diff --git a/images/servo-drives-icon.png b/images/servo-drives-icon.png new file mode 100644 index 0000000..f765f1e --- /dev/null +++ b/images/servo-drives-icon.png | |||
Binary files differ | |||
diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..db8d3b8 --- /dev/null +++ b/main.cpp | |||
@@ -0,0 +1,20 @@ | |||
1 | #include <QGuiApplication> | ||
2 | #include <QQmlApplicationEngine> | ||
3 | |||
4 | int main(int argc, char *argv[]) | ||
5 | { | ||
6 | QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); | ||
7 | |||
8 | QGuiApplication app(argc, argv); | ||
9 | |||
10 | QQmlApplicationEngine engine; | ||
11 | const QUrl url(QStringLiteral("qrc:/main.qml")); | ||
12 | QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, | ||
13 | &app, [url](QObject *obj, const QUrl &objUrl) { | ||
14 | if (!obj && url == objUrl) | ||
15 | QCoreApplication::exit(-1); | ||
16 | }, Qt::QueuedConnection); | ||
17 | engine.load(url); | ||
18 | |||
19 | return app.exec(); | ||
20 | } | ||
diff --git a/main.qml b/main.qml new file mode 100644 index 0000000..5b9757b --- /dev/null +++ b/main.qml | |||
@@ -0,0 +1,721 @@ | |||
1 | import QtQuick 2.14 | ||
2 | import QtQuick.Window 2.14 | ||
3 | import QtQuick.Controls.Styles 1.4 | ||
4 | import QtQuick.Extras 1.4 | ||
5 | import QtQuick.Layouts 1.3 | ||
6 | |||
7 | Window { | ||
8 | id: window | ||
9 | visible: true | ||
10 | visibility: "FullScreen" | ||
11 | title: qsTr("AM62 HMI Demo") | ||
12 | |||
13 | Rectangle { | ||
14 | id: backgroundrect | ||
15 | width: window.width | ||
16 | height: window.height | ||
17 | property int count: 0 | ||
18 | Image { | ||
19 | id: backgroundimage | ||
20 | source:"images/Background.png" | ||
21 | fillMode: Image.PreserveAspectFit | ||
22 | } | ||
23 | Image { | ||
24 | id: motorimage | ||
25 | source: "images/servo-drives-icon.png" | ||
26 | fillMode: Image.PreserveAspectFit | ||
27 | anchors.left: parent.left | ||
28 | anchors.leftMargin: window.width * 0.02 | ||
29 | anchors.right: parent.right | ||
30 | anchors.rightMargin: window.width * 0.87 | ||
31 | anchors.top: parent.top | ||
32 | anchors.topMargin: window.height * 0.01 | ||
33 | anchors.bottom: parent.bottom | ||
34 | anchors.bottomMargin: window.height * 0.80 | ||
35 | |||
36 | } | ||
37 | Image { | ||
38 | id: tilogoimage | ||
39 | source: "images/Texas_Instrument.png" | ||
40 | fillMode: Image.PreserveAspectFit | ||
41 | anchors.left: parent.left | ||
42 | anchors.leftMargin: window.width * 0.70 | ||
43 | anchors.right: parent.right | ||
44 | anchors.rightMargin: window.width * 0.10 | ||
45 | anchors.top: parent.top | ||
46 | anchors.topMargin: window.height * 0.04 | ||
47 | anchors.bottom: parent.bottom | ||
48 | anchors.bottomMargin: window.height * 0.80 | ||
49 | } | ||
50 | |||
51 | Image { | ||
52 | id: toprb | ||
53 | source: "images/Top_Righ_Box.png" | ||
54 | anchors.top: parent.top | ||
55 | anchors.topMargin: window.height * 0.15 | ||
56 | anchors.bottom: parent.bottom | ||
57 | anchors.bottomMargin: window.height * 0.47 | ||
58 | anchors.right: parent.right | ||
59 | anchors.rightMargin: window.width * 0.09 | ||
60 | anchors.left: parent.left | ||
61 | anchors.leftMargin: window.width * 0.62 | ||
62 | |||
63 | Text { | ||
64 | text: qsTr("Motor-1 RPM Control") | ||
65 | color: "#FFFFFF" | ||
66 | anchors.top: parent.top | ||
67 | anchors.topMargin: window.height * 0.02 | ||
68 | anchors.left: parent.left | ||
69 | anchors.leftMargin: window.width * 0.075 | ||
70 | font.pixelSize: parent.width * 0.05 | ||
71 | } | ||
72 | |||
73 | CircularGauge { | ||
74 | id: motorspeed1 | ||
75 | maximumValue: 130 | ||
76 | anchors.top: parent.top | ||
77 | anchors.topMargin: window.height * 0.07 | ||
78 | anchors.left: parent.left | ||
79 | anchors.leftMargin: window.width * 0.03 | ||
80 | width: window.width * 0.22 | ||
81 | height: window.height * 0.22 | ||
82 | property int count1: 0 | ||
83 | value: count1 | ||
84 | Behavior on value { | ||
85 | NumberAnimation { | ||
86 | duration: 200 | ||
87 | } | ||
88 | } | ||
89 | Component.onCompleted: forceActiveFocus() | ||
90 | |||
91 | style: CircularGaugeStyle { | ||
92 | needle: Rectangle { | ||
93 | implicitWidth: outerRadius * 0.02 | ||
94 | implicitHeight: outerRadius * 0.60 | ||
95 | antialiasing: true | ||
96 | color: "#D0001C" | ||
97 | } | ||
98 | foreground: Item { | ||
99 | Rectangle { | ||
100 | width: outerRadius * 0.1 | ||
101 | height: width | ||
102 | radius: width / 2 | ||
103 | color: "#FFFFFF" | ||
104 | anchors.centerIn: parent | ||
105 | } | ||
106 | } | ||
107 | tickmarkLabel: Text { | ||
108 | visible: false | ||
109 | } | ||
110 | |||
111 | tickmark: Rectangle { | ||
112 | visible: false | ||
113 | } | ||
114 | |||
115 | minorTickmark: Rectangle { | ||
116 | visible: false | ||
117 | } | ||
118 | |||
119 | function degreesToRadians(degrees) { | ||
120 | return degrees * (Math.PI / 180); | ||
121 | } | ||
122 | background: Canvas { | ||
123 | onPaint: { | ||
124 | var ctx = getContext("2d"); | ||
125 | ctx.reset(); | ||
126 | |||
127 | ctx.beginPath(); | ||
128 | ctx.strokeStyle = "#C6C6C6"; | ||
129 | ctx.lineWidth = outerRadius * 0.04; | ||
130 | |||
131 | ctx.arc(outerRadius, outerRadius, outerRadius - ctx.lineWidth / 2, | ||
132 | degreesToRadians(valueToAngle(0) - 90), degreesToRadians(valueToAngle(130) - 90)); | ||
133 | ctx.stroke(); | ||
134 | } | ||
135 | } | ||
136 | } | ||
137 | } | ||
138 | |||
139 | |||
140 | Image { | ||
141 | id: rectbox1 | ||
142 | source: "images/Rectangle.png" | ||
143 | anchors.top: parent.top | ||
144 | anchors.topMargin: parent.height * 0.75 | ||
145 | anchors.left: parent.left | ||
146 | anchors.leftMargin: parent.width * 0.36 | ||
147 | width: parent.width * 0.26 | ||
148 | height: parent.height * 0.12 | ||
149 | Text { | ||
150 | id: motor1text | ||
151 | text: qsTr("0") | ||
152 | color: "#FFFFFF" | ||
153 | font.pixelSize: parent.width * 0.20 | ||
154 | anchors.centerIn: parent | ||
155 | } | ||
156 | Image { | ||
157 | id: minusbox1 | ||
158 | source: "images/Minux_Box.png" | ||
159 | fillMode: Image.PreserveAspectFit | ||
160 | width: parent.height | ||
161 | height: parent.height | ||
162 | x: 0 | ||
163 | MouseArea { | ||
164 | anchors.fill: parent | ||
165 | onClicked: { | ||
166 | if (backgroundrect.count == 1) { | ||
167 | motorspeed1.count1 -=10 | ||
168 | if ( motorspeed1.count1 == 10) { | ||
169 | motor1bar.width = window.width * 0.01 | ||
170 | motor1text.text = motorspeed1.count1 | ||
171 | } | ||
172 | else if (motorspeed1.count1 >= 10 && motorspeed1.count1 < 50) { | ||
173 | motor1bar.width -= window.width * 0.025 | ||
174 | motor1text.text = motorspeed1.count1 | ||
175 | } | ||
176 | else if (motorspeed1.count1 >= 50 && motorspeed1.count1 < 70) { | ||
177 | motor1bar.width -= window.width * 0.03 | ||
178 | motor1text.text = motorspeed1.count1 | ||
179 | } | ||
180 | else if (motorspeed1.count1 >= 70 && motorspeed1.count1 < 100) { | ||
181 | motor1bar.width -= window.width * 0.025 | ||
182 | motor1text.text = motorspeed1.count1 | ||
183 | } | ||
184 | else if (motorspeed1.count1 >= 100 && motorspeed1.count1 < 130) { | ||
185 | motor1bar.width -= window.width * 0.03 | ||
186 | motor1text.text = motorspeed1.count1 | ||
187 | } | ||
188 | else if (motorspeed1.count1 >= 130) { | ||
189 | motor1bar.width = window.width * 0.34 | ||
190 | motorspeed1.count1 = 130 | ||
191 | motor1text.text = motorspeed1.count1 | ||
192 | } | ||
193 | else { | ||
194 | motor1bar.width = 0 | ||
195 | motorspeed1.count1 = 0 | ||
196 | motor1text.text = motorspeed1.count1 | ||
197 | } | ||
198 | } | ||
199 | |||
200 | } | ||
201 | } | ||
202 | } | ||
203 | Image { | ||
204 | id: plusbox1 | ||
205 | source: "images/Plus_Box.png" | ||
206 | fillMode: Image.PreserveAspectFit | ||
207 | width: parent.height | ||
208 | height: parent.height | ||
209 | x: parent.width * 0.68 | ||
210 | MouseArea { | ||
211 | anchors.fill: parent | ||
212 | onClicked: { | ||
213 | if (backgroundrect.count == 1) { | ||
214 | motorspeed1.count1 +=10 | ||
215 | if ( motorspeed1.count1 == 10) { | ||
216 | motor1bar.width = window.width * 0.01 | ||
217 | motor1text.text = motorspeed1.count1 | ||
218 | } | ||
219 | else if (motorspeed1.count1 >= 10 && motorspeed1.count1 < 50) { | ||
220 | motor1bar.width += window.width * 0.025 | ||
221 | motor1text.text = motorspeed1.count1 | ||
222 | } | ||
223 | else if (motorspeed1.count1 >= 50 && motorspeed1.count1 < 70) { | ||
224 | motor1bar.width += window.width * 0.03 | ||
225 | motor1text.text = motorspeed1.count1 | ||
226 | } | ||
227 | else if (motorspeed1.count1 >= 70 && motorspeed1.count1 < 100) { | ||
228 | motor1bar.width += window.width * 0.025 | ||
229 | motor1text.text = motorspeed1.count1 | ||
230 | } | ||
231 | else if (motorspeed1.count1 >= 100 && motorspeed1.count1 < 130) { | ||
232 | motor1bar.width += window.width * 0.03 | ||
233 | motor1text.text = motorspeed1.count1 | ||
234 | } | ||
235 | else if (motorspeed1.count1 >= 130) { | ||
236 | motor1bar.width = window.width * 0.34 | ||
237 | motorspeed1.count1 = 130 | ||
238 | motor1text.text = motorspeed1.count1 | ||
239 | } | ||
240 | |||
241 | else { | ||
242 | motor1bar.width = 0 | ||
243 | motorspeed1.count1 = 0 | ||
244 | motor1text.text = motorspeed1.count1 | ||
245 | } | ||
246 | } | ||
247 | else { | ||
248 | textupdate.text = "Press the ON button to start Motor-1 control" | ||
249 | } | ||
250 | } | ||
251 | } | ||
252 | } | ||
253 | |||
254 | } | ||
255 | } | ||
256 | Image { | ||
257 | id: bottomrb | ||
258 | source: "images/Bottom_Right_Box.png" | ||
259 | anchors.top: parent.top | ||
260 | anchors.topMargin: window.height * 0.53 | ||
261 | anchors.bottom: parent.bottom | ||
262 | anchors.bottomMargin: window.height * 0.09 | ||
263 | anchors.right: parent.right | ||
264 | anchors.rightMargin: window.width * 0.09 | ||
265 | anchors.left: parent.left | ||
266 | anchors.leftMargin: window.width * 0.62 | ||
267 | |||
268 | Text { | ||
269 | text: qsTr("Motor-2 RPM Control") | ||
270 | color: "#FFFFFF" | ||
271 | anchors.top: parent.top | ||
272 | anchors.topMargin: window.height * 0.02 | ||
273 | anchors.left: parent.left | ||
274 | anchors.leftMargin: window.width * 0.075 | ||
275 | font.pixelSize: parent.width * 0.05 | ||
276 | } | ||
277 | CircularGauge { | ||
278 | id: motorspeed2 | ||
279 | maximumValue: 130 | ||
280 | anchors.top: parent.top | ||
281 | anchors.topMargin: window.height * 0.07 | ||
282 | anchors.left: parent.left | ||
283 | anchors.leftMargin: window.width * 0.03 | ||
284 | width: window.width * 0.22 | ||
285 | height: window.height * 0.22 | ||
286 | property int count2: 0 | ||
287 | value: count2 | ||
288 | Behavior on value { | ||
289 | NumberAnimation { | ||
290 | duration: 200 | ||
291 | } | ||
292 | } | ||
293 | style: CircularGaugeStyle { | ||
294 | needle: Rectangle { | ||
295 | implicitWidth: outerRadius * 0.02 | ||
296 | implicitHeight: outerRadius * 0.60 | ||
297 | antialiasing: true | ||
298 | color: "#D0001C" | ||
299 | } | ||
300 | foreground: Item { | ||
301 | Rectangle { | ||
302 | width: outerRadius * 0.1 | ||
303 | height: width | ||
304 | radius: width / 2 | ||
305 | color: "#FFFFFF" | ||
306 | anchors.centerIn: parent | ||
307 | } | ||
308 | } | ||
309 | tickmarkLabel: Text { | ||
310 | visible: false | ||
311 | } | ||
312 | |||
313 | tickmark: Rectangle { | ||
314 | visible: false | ||
315 | } | ||
316 | |||
317 | minorTickmark: Rectangle { | ||
318 | visible: false | ||
319 | } | ||
320 | |||
321 | function degreesToRadians(degrees) { | ||
322 | return degrees * (Math.PI / 180); | ||
323 | } | ||
324 | background: Canvas { | ||
325 | onPaint: { | ||
326 | var ctx = getContext("2d"); | ||
327 | ctx.reset(); | ||
328 | |||
329 | ctx.beginPath(); | ||
330 | ctx.strokeStyle = "#C6C6C6"; | ||
331 | ctx.lineWidth = outerRadius * 0.04; | ||
332 | |||
333 | ctx.arc(outerRadius, outerRadius, outerRadius - ctx.lineWidth / 2, | ||
334 | degreesToRadians(valueToAngle(0) - 90), degreesToRadians(valueToAngle(130) - 90)); | ||
335 | ctx.stroke(); | ||
336 | } | ||
337 | } | ||
338 | } | ||
339 | } | ||
340 | Image { | ||
341 | id: rectbox2 | ||
342 | source: "images/Rectangle.png" | ||
343 | anchors.top: parent.top | ||
344 | anchors.topMargin: parent.height * 0.75 | ||
345 | anchors.left: parent.left | ||
346 | anchors.leftMargin: parent.width * 0.36 | ||
347 | width: parent.width * 0.26 | ||
348 | height: parent.height * 0.12 | ||
349 | Text { | ||
350 | id: motor2text | ||
351 | text: qsTr("0") | ||
352 | color: "#FFFFFF" | ||
353 | font.pixelSize: parent.width * 0.20 | ||
354 | anchors.centerIn: parent | ||
355 | } | ||
356 | Image { | ||
357 | id: minusbox2 | ||
358 | source: "images/Minux_Box.png" | ||
359 | fillMode: Image.PreserveAspectFit | ||
360 | width: parent.height | ||
361 | height: parent.height | ||
362 | x: 0 | ||
363 | MouseArea { | ||
364 | anchors.fill: parent | ||
365 | onClicked: { | ||
366 | if (backgroundrect.count == 1) { | ||
367 | motorspeed2.count2 -=10 | ||
368 | if ( motorspeed2.count2 == 10) { | ||
369 | motor2bar.width = window.width * 0.01 | ||
370 | motor2text.text = motorspeed2.count2 | ||
371 | } | ||
372 | else if (motorspeed2.count2 >= 10 && motorspeed2.count2 < 50) { | ||
373 | motor2bar.width -= window.width * 0.025 | ||
374 | motor2text.text = motorspeed2.count2 | ||
375 | } | ||
376 | else if (motorspeed2.count2 >= 50 && motorspeed2.count2 < 70) { | ||
377 | motor2bar.width -= window.width * 0.03 | ||
378 | motor2text.text = motorspeed2.count2 | ||
379 | } | ||
380 | else if (motorspeed2.count2 >= 70 && motorspeed2.count2 < 100) { | ||
381 | motor2bar.width -= window.width * 0.025 | ||
382 | motor2text.text = motorspeed2.count2 | ||
383 | } | ||
384 | else if (motorspeed2.count2 >= 100 && motorspeed2.count2 < 130) { | ||
385 | motor2bar.width -= window.width * 0.03 | ||
386 | motor2text.text = motorspeed2.count2 | ||
387 | } | ||
388 | else if (motorspeed2.count2 >= 130) { | ||
389 | motor2bar.width = window.width * 0.34 | ||
390 | motorspeed2.count2 = 130 | ||
391 | motor2text.text = motorspeed2.count2 | ||
392 | } | ||
393 | else { | ||
394 | motor2bar.width = 0 | ||
395 | motorspeed2.count2 = 0 | ||
396 | motor2text.text = motorspeed2.count2 | ||
397 | } | ||
398 | } | ||
399 | } | ||
400 | } | ||
401 | } | ||
402 | Image { | ||
403 | id: plusbox2 | ||
404 | source: "images/Plus_Box.png" | ||
405 | fillMode: Image.PreserveAspectFit | ||
406 | width: parent.height | ||
407 | height: parent.height | ||
408 | x: parent.width * 0.68 | ||
409 | MouseArea { | ||
410 | anchors.fill: parent | ||
411 | onClicked: { | ||
412 | if (backgroundrect.count == 1) { | ||
413 | motorspeed2.count2 +=10 | ||
414 | if ( motorspeed2.count2 == 10) { | ||
415 | motor2bar.width = window.width * 0.01 | ||
416 | motor2text.text = motorspeed2.count2 | ||
417 | } | ||
418 | else if (motorspeed2.count2 >= 10 && motorspeed2.count2 < 50) { | ||
419 | motor2bar.width += window.width * 0.025 | ||
420 | motor2text.text = motorspeed2.count2 | ||
421 | } | ||
422 | else if (motorspeed2.count2 >= 50 && motorspeed2.count2 < 70) { | ||
423 | motor2bar.width += window.width * 0.03 | ||
424 | motor2text.text = motorspeed2.count2 | ||
425 | } | ||
426 | else if (motorspeed2.count2 >= 70 && motorspeed2.count2 < 100) { | ||
427 | motor2bar.width += window.width * 0.025 | ||
428 | motor2text.text = motorspeed2.count2 | ||
429 | } | ||
430 | else if (motorspeed2.count2 >= 100 && motorspeed2.count2 < 130) { | ||
431 | motor2bar.width += window.width * 0.03 | ||
432 | motor2text.text = motorspeed2.count2 | ||
433 | } | ||
434 | else if (motorspeed2.count2 >= 130) { | ||
435 | motor2bar.width = window.width * 0.34 | ||
436 | motorspeed2.count2 = 130 | ||
437 | motor2text.text = motorspeed2.count2 | ||
438 | } | ||
439 | else { | ||
440 | motor2bar.width = 0 | ||
441 | motorspeed2.count2 = 0 | ||
442 | motor2text.text = motorspeed2.count2 | ||
443 | } | ||
444 | } | ||
445 | else { | ||
446 | textupdate.text = "Press the ON button to start Motor-2 control" | ||
447 | } | ||
448 | } | ||
449 | } | ||
450 | } | ||
451 | |||
452 | } | ||
453 | } | ||
454 | Image { | ||
455 | id: centreb | ||
456 | source: "images/Center_Box.png" | ||
457 | anchors.top: parent.top | ||
458 | anchors.topMargin: window.height * 0.15 | ||
459 | anchors.bottom: parent.bottom | ||
460 | anchors.bottomMargin: window.height * 0.09 | ||
461 | anchors.right: parent.right | ||
462 | anchors.rightMargin: window.width * 0.38 | ||
463 | anchors.left: parent.left | ||
464 | anchors.leftMargin: window.width * 0.15 | ||
465 | |||
466 | Image { | ||
467 | source: "images/Motor_Temp.png" | ||
468 | fillMode: Image.PreserveAspectFit | ||
469 | anchors.top: parent.top | ||
470 | anchors.topMargin: window.height * 0.03 | ||
471 | anchors.left: parent.left | ||
472 | anchors.leftMargin: window.width * 0.06 | ||
473 | anchors.right: parent.right | ||
474 | anchors.rightMargin: window.width * 0.22 | ||
475 | anchors.bottom: parent.bottom | ||
476 | anchors.bottomMargin: window.height * 0.65 | ||
477 | } | ||
478 | Image { | ||
479 | id: motor1image | ||
480 | Text { | ||
481 | id: motor1 | ||
482 | text: qsTr("Motor 1") | ||
483 | y: -1 * parent.height * 1.2 | ||
484 | color: "#FFFFFF" | ||
485 | font.pixelSize: parent.width * 0.04 | ||
486 | } | ||
487 | source: "images/Repeat_Grid.png" | ||
488 | fillMode: Image.PreserveAspectFit | ||
489 | anchors.top: parent.top | ||
490 | anchors.topMargin: window.height * 0.25 | ||
491 | anchors.left: parent.left | ||
492 | anchors.leftMargin: window.width * 0.06 | ||
493 | anchors.right: parent.right | ||
494 | anchors.rightMargin: window.width * 0.07 | ||
495 | anchors.bottom: parent.bottom | ||
496 | anchors.bottomMargin: window.height * 0.45 | ||
497 | Rectangle { | ||
498 | |||
499 | id: motor1tempbar | ||
500 | width: motor1image.width | ||
501 | height: motor1image.width * 0.05 | ||
502 | color: "#A0A0A0" | ||
503 | anchors.top: motor1.bottom | ||
504 | anchors.topMargin: window.height * 0.02 | ||
505 | Rectangle { | ||
506 | id: motor1bar | ||
507 | color: "#FFFFFF" | ||
508 | width: 0 | ||
509 | height: parent.height | ||
510 | } | ||
511 | } | ||
512 | } | ||
513 | Image { | ||
514 | id: motor2image | ||
515 | Text { | ||
516 | id: motor2 | ||
517 | text: qsTr("Motor 2") | ||
518 | y: -1 * parent.height * 1.2 | ||
519 | color: "#FFFFFF" | ||
520 | font.pixelSize: parent.width * 0.04 | ||
521 | } | ||
522 | source: "images/Repeat_Grid.png" | ||
523 | fillMode: Image.PreserveAspectFit | ||
524 | anchors.top: parent.top | ||
525 | anchors.topMargin: window.height * 0.50 | ||
526 | anchors.left: parent.left | ||
527 | anchors.leftMargin: window.width * 0.06 | ||
528 | anchors.right: parent.right | ||
529 | anchors.rightMargin: window.width * 0.07 | ||
530 | anchors.bottom: parent.bottom | ||
531 | anchors.bottomMargin: window.height * 0.20 | ||
532 | Rectangle { | ||
533 | id: motor2tempbar | ||
534 | width: motor2image.width | ||
535 | height: motor2image.width * 0.05 | ||
536 | color: "#A0A0A0" | ||
537 | anchors.top: motor2.bottom | ||
538 | anchors.topMargin: window.height * 0.02 | ||
539 | Rectangle { | ||
540 | id: motor2bar | ||
541 | color: "#FFFFFF" | ||
542 | width: 0 | ||
543 | height: parent.height | ||
544 | } | ||
545 | } | ||
546 | } | ||
547 | } | ||
548 | Image { | ||
549 | id: controlimage | ||
550 | source: "images/Control_Panel_with_text.png" | ||
551 | fillMode: Image.PreserveAspectFit | ||
552 | anchors.top: parent.top | ||
553 | anchors.topMargin: window.height * 0.20 | ||
554 | anchors.bottom: parent.bottom | ||
555 | anchors.bottomMargin: window.height * 0.77 | ||
556 | anchors.right: parent.right | ||
557 | anchors.rightMargin: window.width * 0.89 | ||
558 | anchors.left: parent.left | ||
559 | anchors.leftMargin: window.width * 0.03 | ||
560 | Rectangle{ | ||
561 | id:controlfill | ||
562 | color: "transparent" | ||
563 | z: -1 | ||
564 | x: -1 * (parent.width) | ||
565 | width: parent.width * 2.56 | ||
566 | height: parent.height * 1.5 | ||
567 | MouseArea { | ||
568 | anchors.fill: parent | ||
569 | hoverEnabled: true | ||
570 | onEntered: { | ||
571 | controlfill.color = "#C6C6C6" | ||
572 | } | ||
573 | onExited: { | ||
574 | controlfill.color = "transparent" | ||
575 | } | ||
576 | onClicked: { | ||
577 | controlfill.color = "#C6C6C6" | ||
578 | textupdate.text = "Control Panel Selected" | ||
579 | } | ||
580 | onReleased: { | ||
581 | controlfill.color = "transparent" | ||
582 | } | ||
583 | } | ||
584 | } | ||
585 | } | ||
586 | Image { | ||
587 | id: renderimage | ||
588 | source: "images/3D_with_text.png" | ||
589 | fillMode: Image.PreserveAspectFit | ||
590 | anchors.top: parent.top | ||
591 | anchors.topMargin: window.height * 0.29 | ||
592 | anchors.bottom: parent.bottom | ||
593 | anchors.bottomMargin: window.height * 0.68 | ||
594 | anchors.right: parent.right | ||
595 | anchors.rightMargin: window.width * 0.94 | ||
596 | anchors.left: parent.left | ||
597 | anchors.leftMargin: window.width * 0.03 | ||
598 | Rectangle{ | ||
599 | id:renderfill | ||
600 | color: "transparent" | ||
601 | z: -1 | ||
602 | x: -1 * (parent.width) | ||
603 | width: parent.width * 5.2 | ||
604 | height: parent.height * 1.5 | ||
605 | MouseArea { | ||
606 | anchors.fill: parent | ||
607 | hoverEnabled: true | ||
608 | onEntered: { | ||
609 | renderfill.color = "#C6C6C6" | ||
610 | } | ||
611 | onExited: { | ||
612 | renderfill.color = "transparent" | ||
613 | } | ||
614 | onClicked: { | ||
615 | renderfill.color = "#C6C6C6" | ||
616 | textupdate.text = "3D Demo Selected (Coming Soon)" | ||
617 | } | ||
618 | onReleased: { | ||
619 | renderfill.color = "transparent" | ||
620 | } | ||
621 | } | ||
622 | } | ||
623 | } | ||
624 | Image { | ||
625 | id: analyticsimage | ||
626 | source: "images/Analytics_with_text.png" | ||
627 | fillMode: Image.PreserveAspectFit | ||
628 | anchors.top: parent.top | ||
629 | anchors.topMargin: window.height * 0.38 | ||
630 | anchors.bottom: parent.bottom | ||
631 | anchors.bottomMargin: window.height * 0.59 | ||
632 | anchors.right: parent.right | ||
633 | anchors.rightMargin: window.width * 0.91 | ||
634 | anchors.left: parent.left | ||
635 | anchors.leftMargin: window.width * 0.03 | ||
636 | Rectangle{ | ||
637 | id:analyticsill | ||
638 | color: "transparent" | ||
639 | z: -1 | ||
640 | x: -1 * (parent.width) | ||
641 | width: parent.width * 3.1 | ||
642 | height: parent.height * 1.5 | ||
643 | MouseArea { | ||
644 | anchors.fill: parent | ||
645 | hoverEnabled: true | ||
646 | onEntered: { | ||
647 | analyticsill.color = "#C6C6C6" | ||
648 | } | ||
649 | onExited: { | ||
650 | analyticsill.color = "transparent" | ||
651 | } | ||
652 | onClicked: { | ||
653 | analyticsill.color = "#C6C6C6" | ||
654 | textupdate.text = "Analytics Demo Selected (Coming Soon)" | ||
655 | } | ||
656 | onReleased: { | ||
657 | analyticsill.color = "transparent" | ||
658 | } | ||
659 | } | ||
660 | } | ||
661 | } | ||
662 | Image { | ||
663 | id: statusheader | ||
664 | source: "images/Status_Message.png" | ||
665 | fillMode: Image.PreserveAspectFit | ||
666 | anchors.top: parent.top | ||
667 | anchors.topMargin: window.height * 0.06 | ||
668 | anchors.bottom: parent.bottom | ||
669 | anchors.bottomMargin: window.height * 0.90 | ||
670 | anchors.right: parent.right | ||
671 | anchors.rightMargin: window.width * 0.70 | ||
672 | anchors.left: parent.left | ||
673 | anchors.leftMargin: window.width * 0.15 | ||
674 | Text { | ||
675 | id: textupdate | ||
676 | text: qsTr("Press the ON button.") | ||
677 | anchors.top: parent.top | ||
678 | anchors.topMargin: parent.height * 1.2 | ||
679 | anchors.left: parent.left | ||
680 | anchors.leftMargin: parent.width * 0.03 | ||
681 | color: "#14AFC0" | ||
682 | font.pixelSize: parent.width * 0.12 | ||
683 | } | ||
684 | } | ||
685 | Image { | ||
686 | id: powerimage | ||
687 | source: "images/On_Button.png" | ||
688 | fillMode: Image.PreserveAspectFit | ||
689 | anchors.top: parent.top | ||
690 | anchors.topMargin: window.height * 0.70 | ||
691 | anchors.bottom: parent.bottom | ||
692 | anchors.bottomMargin: window.height * 0.16 | ||
693 | anchors.right: parent.right | ||
694 | anchors.rightMargin: window.width * 0.90 | ||
695 | anchors.left: parent.left | ||
696 | anchors.leftMargin: window.width * 0.04 | ||
697 | |||
698 | MouseArea { | ||
699 | anchors.fill: parent | ||
700 | onClicked: { | ||
701 | if(backgroundrect.count == 1) { | ||
702 | powerimage.source = "images/On_Button.png" | ||
703 | backgroundrect.count = 0 | ||
704 | textupdate.text = "Off Button Pressed" | ||
705 | motorspeed1.count1 = 0 | ||
706 | motor1text.text = motorspeed1.count1 | ||
707 | motor1bar.width = 0 | ||
708 | motorspeed2.count2 = 0 | ||
709 | motor2text.text = motorspeed2.count2 | ||
710 | motor2bar.width = 0 | ||
711 | } | ||
712 | else { | ||
713 | powerimage.source = "images/Off_Button.png" | ||
714 | backgroundrect.count = 1 | ||
715 | textupdate.text = "On Button Pressed" | ||
716 | } | ||
717 | } | ||
718 | } | ||
719 | } | ||
720 | } | ||
721 | } | ||
@@ -0,0 +1,22 @@ | |||
1 | <RCC> | ||
2 | <qresource prefix="/"> | ||
3 | <file>main.qml</file> | ||
4 | <file>images/Top_Righ_Box.png</file> | ||
5 | <file>images/Texas_Instrument.png</file> | ||
6 | <file>images/Status_Message.png</file> | ||
7 | <file>images/Control_Panel_with_text.png</file> | ||
8 | <file>images/Center_Box.png</file> | ||
9 | <file>images/Bottom_Right_Box.png</file> | ||
10 | <file>images/Background.png</file> | ||
11 | <file>images/Rectangle.png</file> | ||
12 | <file>images/Analytics_with_text.png</file> | ||
13 | <file>images/Minux_Box.png</file> | ||
14 | <file>images/Motor_Temp.png</file> | ||
15 | <file>images/3D_with_text.png</file> | ||
16 | <file>images/On_Button.png</file> | ||
17 | <file>images/Off_Button.png</file> | ||
18 | <file>images/Repeat_Grid.png</file> | ||
19 | <file>images/servo-drives-icon.png</file> | ||
20 | <file>images/Plus_Box.png</file> | ||
21 | </qresource> | ||
22 | </RCC> | ||