1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- pragma Singleton
- import QtQuick 2.0
- Item {
- property string versionINFO: "S0-V001"
- // property color customer_color_base: "#FF00ADEF" // Basisfarbe Kundenabhängig
- property color customer_color_base: "#FF559F98" // Basisfarbe Kundenabhängig
- property string baseDir: "/opt/GfA-Browser"
- property string logoSplash: "/images/Logo_Gfa.svg"
- property string logoMenu: "/images/Logo_Gfa_.svg"
- property string cam1Name: "---"
- property string cam1Model: "---"
- property string cam1Ver: "---"
- property string cam1MAC: "---"
- property string cam2Name: "---"
- property string cam2Model: "---"
- property string cam2Ver: "---"
- property string cam2MAC: "---"
- //: ID:active_user_role active user role shown in status line
- property string actUserRole: "admin"
- property string startTO: "" //"/HMI_SettingsContainer.qml"
- property string in1Status: "-" // Input 1 Status
- property string in2Status: "-" // Input 2 Status
- property string in3Status: "-" // Input 3 Status
- property string in4Status: "-" // Input 4 Status
- function getActUserRoleText(roleid){
- var ret;
- switch (roleid){
- default :
- actUserRole = "oper";
- case "oper":
- //: ID:user_role_oper USER Role Operator text shown in status line and pwd settings
- ret = qsTrId("user_role_oper") + transLoad.emptyString
- break;
- case "eng":
- //: ID:user_role_eng USER Role Engineer text shown in status line and pwd settings
- ret = qsTrId("user_role_eng") + transLoad.emptyString
- break;
- case "admin":
- //: ID:user_role_admin USER Role Administrator text shown in status line and pwd settings
- ret = qsTrId("user_role_admin") + transLoad.emptyString
- break;
- }
- return ret;
- }
- // Auslesen Kameranamen ....
- function jsonGetSystem(url, id) {
- var doc = new XMLHttpRequest();
- doc.onreadystatechange = function() {
- if (doc.readyState === XMLHttpRequest.DONE) {
- var linesSystem = doc.responseText.split(/[\r\n]+/g);
- if (id === 1)
- cam1Name = cam1Model = cam1Ver = cam1MAC = "--";
- else
- cam2Name = cam2Model = cam2Ver = cam2MAC = "--";
- for(var ii = 0; ii < linesSystem.length; ii++) {
- var sysitem = linesSystem[ii].split(" ");
- console.debug(JSON.stringify(sysitem));
- if(sysitem[0] === "name") {if ( id === 1) cam1Name = sysitem[2]; else cam2Name = sysitem[2];}
- if(sysitem[0] === "model") {if ( id === 1) cam1Model = sysitem[2]; else cam2Model = sysitem[2];}
- if(sysitem[0] === "ver") {if ( id === 1) cam1Ver = sysitem[2]; else cam2Ver = sysitem[2];}
- if(sysitem[0] === "mac") {if ( id === 1) cam1MAC = sysitem[2]; else cam2MAC = sysitem[2];}
- }
- }
- }
- doc.open("put", url);
- doc.setRequestHeader("Content-Type","text/plain");
- doc.setRequestHeader("Accept","text/plain");
- doc.send("get system");
- }
- }
|