Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Thiago Santini
EyeRecToo
Commits
0267349b
Commit
0267349b
authored
Nov 27, 2017
by
Thiago Santini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allows camera widget to be larger than the actual image
parent
d079d025
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
EyeRecToo/src/CameraWidget.cpp
EyeRecToo/src/CameraWidget.cpp
+8
-2
EyeRecToo/src/Synchronizer.cpp
EyeRecToo/src/Synchronizer.cpp
+3
-3
No files found.
EyeRecToo/src/CameraWidget.cpp
View file @
0267349b
...
...
@@ -476,9 +476,15 @@ void CameraWidget::updateWidgetSize(const int &width, const int &height)
return
;
frameSize
=
newFrameSize
;
QSize
minMaxSize
=
{
640
,
480
};
QSize
maxSize
=
{
960
,
540
};
if
(
frameSize
.
width
()
<
maxSize
.
width
()
&&
frameSize
.
height
()
<
maxSize
.
height
()
)
if
(
frameSize
.
width
()
<
maxSize
.
width
()
&&
frameSize
.
height
()
<
maxSize
.
height
()
)
{
if
(
frameSize
.
width
()
<
minMaxSize
.
width
()
&&
frameSize
.
height
()
<
minMaxSize
.
height
())
{
float
ratio
=
minMaxSize
.
width
()
/
(
float
)
frameSize
.
width
();
frameSize
.
setWidth
(
minMaxSize
.
width
());
frameSize
.
setHeight
(
ratio
*
minMaxSize
.
height
());
}
this
->
setMaximumSize
(
frameSize
);
else
}
else
this
->
setMaximumSize
(
maxSize
);
}
EyeRecToo/src/Synchronizer.cpp
View file @
0267349b
...
...
@@ -42,7 +42,7 @@ Synchronizer::~Synchronizer()
void
Synchronizer
::
newRightEyeData
(
EyeData
eyeData
)
{
rEyeList
.
push
_back
(
eyeData
);
rEyeList
.
emplace
_back
(
eyeData
);
if
(
rEyeList
.
size
()
>
maxListSize
)
rEyeList
.
pop_front
();
updated
=
true
;
...
...
@@ -52,7 +52,7 @@ void Synchronizer::newRightEyeData(EyeData eyeData)
void
Synchronizer
::
newLeftEyeData
(
EyeData
eyeData
)
{
lEyeList
.
push
_back
(
eyeData
);
lEyeList
.
emplace
_back
(
eyeData
);
if
(
lEyeList
.
size
()
>
maxListSize
)
lEyeList
.
pop_front
();
updated
=
true
;
...
...
@@ -63,7 +63,7 @@ void Synchronizer::newLeftEyeData(EyeData eyeData)
void
Synchronizer
::
newFieldData
(
FieldData
fieldData
)
{
fieldList
.
push
_back
(
fieldData
);
fieldList
.
emplace
_back
(
fieldData
);
if
(
fieldList
.
size
()
>
maxListSize
)
fieldList
.
pop_front
();
updated
=
true
;
...
...
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