Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
42a3411f
Unverified
Commit
42a3411f
authored
5 years ago
by
Gus Grubba
Committed by
GitHub
5 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7963 from olliw42/pr-qmlclean
CameraManager: bug, cleanups in CameraPageWidget.qml
parents
8c90b770
bd997d44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
CameraPageWidget.qml
src/FlightMap/Widgets/CameraPageWidget.qml
+12
-12
No files found.
src/FlightMap/Widgets/CameraPageWidget.qml
View file @
42a3411f
...
...
@@ -32,22 +32,22 @@ Column {
property
var
_dynamicCameras
:
activeVehicle
?
activeVehicle
.
dynamicCameras
:
null
property
bool
_isCamera
:
_dynamicCameras
?
_dynamicCameras
.
cameras
.
count
>
0
:
false
property
int
_curCameraIndex
:
_dynamicCameras
?
_dynamicCameras
.
currentCamera
:
0
property
var
_camera
:
_isCamera
?
(
_dynamicCameras
.
cameras
.
get
(
_curCameraIndex
)
&&
_dynamicCameras
.
cameras
.
get
(
_curCameraIndex
).
paramComplete
?
_dynamicCameras
.
cameras
.
get
(
_curCameraIndex
)
:
null
)
:
null
property
bool
_cameraModeUndefined
:
_camera
?
_dynamicCameras
.
cameras
.
get
(
_curCameraIndex
).
cameraMode
===
QGCCameraControl
.
CAMERA_MODE_UNDEFINED
:
true
property
bool
_cameraVideoMode
:
_camera
?
_dynamicCameras
.
cameras
.
get
(
_curCameraIndex
).
cameraMode
===
1
:
false
property
bool
_cameraPhotoMode
:
_camera
?
_dynamicCameras
.
cameras
.
get
(
_curCameraIndex
).
cameraMode
===
0
:
false
property
bool
_cameraPhotoIdle
:
_camera
&&
_camera
.
photoStatus
===
QGCCameraControl
.
PHOTO_CAPTURE_IDLE
property
bool
_cameraModeUndefined
:
_camera
?
_camera
.
cameraMode
===
QGCCameraControl
.
CAM_MODE_UNDEFINED
:
true
property
bool
_cameraVideoMode
:
_camera
?
_camera
.
cameraMode
===
QGCCameraControl
.
CAM_MODE_VIDEO
:
false
property
bool
_cameraPhotoMode
:
_camera
?
_camera
.
cameraMode
===
QGCCameraControl
.
CAM_MODE_PHOTO
:
false
property
bool
_cameraElapsedMode
:
_camera
&&
_camera
.
cameraMode
===
QGCCameraControl
.
CAM_MODE_PHOTO
&&
_camera
.
photoMode
===
QGCCameraControl
.
PHOTO_CAPTURE_TIMELAPSE
property
real
_spacers
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
property
real
_labelFieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
30
property
real
_editFieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
30
property
bool
_communicationLost
:
activeVehicle
?
activeVehicle
.
connectionLost
:
false
property
bool
_hasModes
:
_camera
&&
_camera
&&
_camera
.
hasModes
property
bool
_hasModes
:
_camera
&&
_camera
.
hasModes
property
bool
_videoRecording
:
_camera
&&
_camera
.
videoStatus
===
QGCCameraControl
.
VIDEO_CAPTURE_STATUS_RUNNING
property
bool
_photoIdle
:
_camera
&&
_camera
.
photoStatus
===
QGCCameraControl
.
PHOTO_CAPTURE_IDLE
property
bool
_storageReady
:
_camera
&&
_camera
.
storageStatus
===
QGCCameraControl
.
STORAGE_READY
property
bool
_storageIgnored
:
_camera
&&
_camera
.
storageStatus
===
QGCCameraControl
.
STORAGE_NOT_SUPPORTED
property
bool
_canShoot
:
!
_videoRecording
&&
_cameraPhotoIdle
&&
((
_storageReady
&&
_camera
.
storageFree
>
0
)
||
_storageIgnored
)
property
int
_curCameraIndex
:
_dynamicCameras
?
_dynamicCameras
.
currentCamera
:
0
property
bool
_canShoot
:
!
_cameraModeUndefined
&&
!
_videoRecording
&&
_photoIdle
&&
((
_storageReady
&&
_camera
.
storageFree
>
0
)
||
_storageIgnored
)
function
showSettings
()
{
mainWindow
.
showComponentDialog
(
cameraSettings
,
_cameraVideoMode
?
qsTr
(
"
Video Settings
"
)
:
qsTr
(
"
Camera Settings
"
),
70
,
StandardButton
.
Ok
)
...
...
@@ -154,20 +154,20 @@ Column {
border.width
:
3
anchors.horizontalCenter
:
parent
.
horizontalCenter
Rectangle
{
width
:
parent
.
width
*
(
_videoRecording
||
(
_cameraPhotoMode
&&
!
_
cameraP
hotoIdle
&&
_cameraElapsedMode
)
?
0.5
:
0.75
)
width
:
parent
.
width
*
(
_videoRecording
||
(
_cameraPhotoMode
&&
!
_
p
hotoIdle
&&
_cameraElapsedMode
)
?
0.5
:
0.75
)
height
:
width
radius
:
_videoRecording
||
(
_cameraPhotoMode
&&
!
_
cameraP
hotoIdle
&&
_cameraElapsedMode
)
?
0
:
width
*
0.5
color
:
(
_cameraModeUndefined
||
!
_canShoot
)
?
qgcPal
.
colorGrey
:
qgcPal
.
colorRed
radius
:
_videoRecording
||
(
_cameraPhotoMode
&&
!
_
p
hotoIdle
&&
_cameraElapsedMode
)
?
0
:
width
*
0.5
color
:
_canShoot
?
qgcPal
.
colorRed
:
qgcPal
.
colorGrey
anchors.centerIn
:
parent
}
MouseArea
{
anchors.fill
:
parent
enabled
:
!
_cameraModeUndefined
&&
_canShoot
enabled
:
_canShoot
onClicked
:
{
if
(
_cameraVideoMode
)
{
_camera
.
toggleVideo
()
}
else
{
if
(
_cameraPhotoMode
&&
!
_
cameraP
hotoIdle
&&
_cameraElapsedMode
)
{
if
(
_cameraPhotoMode
&&
!
_
p
hotoIdle
&&
_cameraElapsedMode
)
{
_camera
.
stopTakePhoto
()
}
else
{
_camera
.
takePhoto
()
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment