Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PeTrack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pedestrian Dynamics Empiricism
PeTrack
Commits
eb9ee91f
Commit
eb9ee91f
authored
1 year ago
by
d.kilic
Browse files
Options
Downloads
Plain Diff
Merge branch 'refactor-grid-item' into 'master'
Refactor grid item See merge request
!294
parents
acb0f219
8fb7f148
No related branches found
No related tags found
1 merge request
!294
Refactor grid item
Pipeline
#105327
canceled
1 year ago
Stage: build_environment
Stage: pre-build-checks
Stage: build
Stage: test
Changes
2
Pipelines
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/gridItem.h
+25
-11
25 additions, 11 deletions
include/gridItem.h
src/gridItem.cpp
+178
-347
178 additions, 347 deletions
src/gridItem.cpp
with
203 additions
and
358 deletions
include/gridItem.h
+
25
−
11
View file @
eb9ee91f
...
...
@@ -26,27 +26,41 @@ class CoordinateSystemBox;
#include
"extrCalibration.h"
#include
<QGraphicsItem>
#include
<utility>
class
GridItem
:
public
QGraphicsItem
{
private:
Petrack
*
mMainWindow
;
ExtrCalibration
*
mExtCalib
;
ExtrCalibration
*
mExt
r
Calib
;
CoordinateSystemBox
*
mCoordSys
;
Control
*
mControlWidget
;
float
mouse
_x
,
mouse
_y
;
int
g
ridTrans
_x
,
g
ridTrans
_y
;
int
g
ridDimension
;
float
m
M
ouse
X
,
m
M
ouse
Y
;
int
mG
ridTrans
X
,
mG
ridTrans
Y
;
int
mG
ridDimension
;
public:
inline
void
setGridDimension
(
int
gDimension
)
{
this
->
g
ridDimension
=
gDimension
;
}
inline
int
getGridDimension
()
const
{
return
this
->
g
ridDimension
;
}
inline
void
setGridDimension
(
int
gDimension
)
{
this
->
mG
ridDimension
=
gDimension
;
}
inline
int
getGridDimension
()
const
{
return
this
->
mG
ridDimension
;
}
GridItem
(
QWidget
*
wParent
,
QGraphicsItem
*
parent
,
CoordinateSystemBox
*
coordSys
);
QRectF
boundingRect
()
const
;
void
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
);
void
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
);
int
drawLine
(
QPainter
*
painter
,
cv
::
Point2f
*
p
,
int
y_offset
);
void
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
);
QRectF
boundingRect
()
const
override
;
void
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
)
override
;
void
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
)
override
;
void
drawLine
(
QPainter
*
painter
,
const
std
::
array
<
cv
::
Point2f
,
2
>
&
p
);
void
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
)
override
;
private
:
void
draw2DGrid
(
QPainter
*
painter
,
int
imageHeight
,
int
imageWidth
,
int
borderSize
);
void
draw3DGrid
(
QPainter
*
painter
,
int
imageHeight
,
int
imageWidth
,
int
borderSize
,
bool
vanishPointYIsInsideImage
,
bool
vanishPointXIsInsideImage
,
cv
::
Point2f
vanishPointY
,
cv
::
Point2f
vanishPointX
);
};
#endif
This diff is collapsed.
Click to expand it.
src/gridItem.cpp
+
178
−
347
View file @
eb9ee91f
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment