2
* uvc50.qml -- extension settings for cu50 cameras
3
* Copyright © 2015 e-con Systems India Pvt. Limited
5
* This file is part of Qtcam.
7
* Qtcam is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 3, or (at your option)
12
* Qtcam is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with Qtcam. If not, see <http://www.gnu.org/licenses/>.
22
import QtQuick.Controls 1.1
23
import QtQuick.Controls.Styles 1.0
24
import QtQuick.Dialogs 1.1
25
import econ.camera.uvcsettings 1.0
26
import econ.camera.see3cam50 1.0
27
import econ.camera.see3camControl 1.0
28
import econ.camera.see3camGpioControl 1.0
30
import econ.camera.stream 1.0
31
import econ.camera.property 1.0
35
property bool outputPinFlag
36
property var frameToSkip
37
property variant uniqueSerialNumber
38
property int value_ret
39
id: see3CAM_cu50Camera
44
function onTakeScreenShot()
46
root.imageCapture(CommonEnums.SNAP_SHOT);
48
function onGetVideoPinStatus()
50
root.enableVideoPin(true);
52
function onGetStillImageFormats()
54
var stillImageFormat = []
55
stillImageFormat.push("jpg")
56
stillImageFormat.push("bmp")
57
stillImageFormat.push("raw")
58
stillImageFormat.push("png")
59
root.insertStillImageFormat(stillImageFormat);
86
text: "--- GPIO Controls ---"
93
opacity: 0.50196078431373
100
font.family: "Ubuntu"
112
ListElement { text: "1" }
113
ListElement { text: "2" }
118
activeFocusOnPress : true
119
style: ComboBoxStyle {
122
source: "images/gpo_no_box.png"
124
width: gpobox.sourceSize.width - 28
125
height: gpobox.sourceSize.height
127
border.color: "white"
128
border.width: control.activeFocus ? 3 : 1
129
radius: control.activeFocus ? 5 : 0
134
text: control.currentText
135
elide: Text.ElideRight
136
verticalAlignment: Text.AlignVCenter
139
onCurrentIndexChanged: {
141
if(currentIndex == 0)
142
see3camGpio.getGpioLevel(See3CamGpio.OUT1)
144
see3camGpio.getGpioLevel(See3CamGpio.OUT2)
150
source: "images/gpo_no_drowdown.png"
160
font.family: "Ubuntu"
172
ExclusiveGroup { id: group }
174
exclusiveGroup: group
176
style: RadioButtonStyle {
180
font.family: "Ubuntu"
185
background: Rectangle {
187
border.color: control.activeFocus ? "#ffffff" : "#222021"
192
if(gpioOutputBox.currentIndex == 0)
193
see3camGpio.setGpioLevel(See3CamGpio.OUT1,See3CamGpio.High)//Pin Number & Value
195
see3camGpio.setGpioLevel(See3CamGpio.OUT2,See3CamGpio.High)//Pin Number & Value
197
Keys.onReturnPressed: {
200
if(gpioOutputBox.currentIndex == 0)
201
see3camGpio.setGpioLevel(See3CamGpio.OUT1,See3CamGpio.High)//Pin Number & Value
203
see3camGpio.setGpioLevel(See3CamGpio.OUT2,See3CamGpio.High)//Pin Number & Value
208
exclusiveGroup: group
210
style: RadioButtonStyle {
214
font.family: "Ubuntu"
219
background: Rectangle {
221
border.color: control.activeFocus ? "#ffffff" : "#222021"
226
if(gpioOutputBox.currentIndex == 0)
227
see3camGpio.setGpioLevel(See3CamGpio.OUT1,See3CamGpio.Low);//Pin Number & Value
229
see3camGpio.setGpioLevel(See3CamGpio.OUT2,See3CamGpio.Low);//Pin Number & Value
231
Keys.onReturnPressed: {
234
if(gpioOutputBox.currentIndex == 0)
235
see3camGpio.setGpioLevel(See3CamGpio.OUT1,See3CamGpio.Low);//Pin Number & Value
237
see3camGpio.setGpioLevel(See3CamGpio.OUT2,See3CamGpio.Low);//Pin Number & Value
246
font.family: "Ubuntu"
257
ListElement { text: "1" }
258
ListElement { text: "2" }
264
activeFocusOnPress : true
265
style: ComboBoxStyle {
268
source: "images/gpi_no_box.png"
270
width: gpiboxImg.sourceSize.width - 28
271
height: gpiboxImg.sourceSize.height
273
border.color: "white"
274
border.width: control.activeFocus ? 3 : 1
275
radius: control.activeFocus ? 5 : 0
280
text: control.currentText
281
elide: Text.ElideRight
282
verticalAlignment: Text.AlignVCenter
285
onCurrentIndexChanged: {
286
gpi_level_high.text = "GPI Level : "
293
font.family: "Ubuntu"
307
activeFocusOnPress : true
308
tooltip: "Get the status of Input PIN"
310
background: Rectangle {
311
border.width: control.activeFocus ? 3 :0
313
border.color: control.activeFocus ? "#ffffff" : "#222021"
317
source: "images/get_gpi_selected.png"
320
Keys.onReturnPressed: {
327
source: "images/gpi_no_dropdown.png"
334
id: torch_controlsCU50
335
text: "--- Torch Control ---"
337
font.family: "Ubuntu"
342
opacity: 0.50196078431373
351
activeFocusOnPress : true
352
style: CheckBoxStyle {
356
font.family: "Ubuntu"
360
} background: Rectangle {
361
border.width: control.activeFocus ? 1 :0
363
border.color: control.activeFocus ? "#ffffff" : "#222021"
367
see3camctrl.setTorchControlState(checked)
369
Keys.onReturnPressed: {
374
see3camctrl.setTorchControlState(checked)
379
id: other_optionsCU50
380
text: "--- Other Options ---"
382
font.family: "Ubuntu"
387
opacity: 0.50196078431373
391
id: serial_no_selected
396
activeFocusOnPress : true
397
tooltip: "Click to view the Serial Number"
399
background: Rectangle {
400
border.width: control.activeFocus ? 3 :0
402
border.color: control.activeFocus ? "#ffffff" : "#222021"
406
source: "images/serial_no_selected.png"
409
Keys.onReturnPressed: {
415
id: f_wversion_selectedCU50
419
action: firmwareVersion
420
activeFocusOnPress : true
421
tooltip: "Click to view the firmware version of the camera"
423
background: Rectangle {
424
border.width: control.activeFocus ? 3 :0
426
border.color: control.activeFocus ? "#ffffff" : "#222021"
430
source: "images/f_wversion_selected.png"
433
Keys.onReturnPressed: {
440
icon: StandardIcon.Information
445
Component.onCompleted:{
457
onTitleTextChanged: {
458
messageDialog.title = _title.toString()
459
messageDialog.text = _text.toString()
463
messageDialog.title = qsTr("Serial Number")
464
messageDialog.text = serialNumber;
470
onUpdateTorchCheckBox: {
471
if(torch_Check_state === "1") {
472
torch_ctrl.checked = true;
475
torch_ctrl.checked = false;
484
messageDialog.title = title.toString()
485
messageDialog.text = message.toString()
493
messageDialog.title = title.toString()
494
messageDialog.text = message.toString()
500
radioLowcu50.checked = true
502
gpi_level_high.text = "GPI Level : <b>Low</b>"
505
radioHighcu50.checked = true
507
gpi_level_high.text = "GPI Level : <b>High</b>"
512
function getGpiStatus() {
513
outputPinFlag = false
514
if(gpi_no_boxCU50.currentIndex == 0){
515
see3camGpio.getGpioLevel(See3CamGpio.IN1) //PIN Number
517
see3camGpio.getGpioLevel(See3CamGpio.IN2) //PIN Number
521
function getSerialNumber() {
522
uvccamera.getSerialNumber()
526
function getFirmwareVersion() {
527
uvccamera.getFirmWareVersion()
531
Component.onCompleted:{
532
gpioOutputBox.forceActiveFocus()
534
seecam50.getTorchLevel()
536
see3camGpio.getGpioLevel(See3CamGpio.OUT1)
537
uniqueSerialNumber = uvccamera.retrieveSerialNumber()
539
// Added by Navya : 07 May 2019 - To get usbspeed and assign skipframes accordingly
540
value_ret=camproperty.getUsbSpeed(uniqueSerialNumber)
546
root.updateFrametoSkip(frameToSkip);
550
Component.onDestruction:{
552
root.updateFrametoSkip(frameToSkip);