Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
6e4e1530
Commit
6e4e1530
authored
Dec 19, 2018
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QT: Fixed xtt_multiview.
parent
2ce48869
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
132 additions
and
302 deletions
+132
-302
xtt/lib/cow/qt/cow_wow_qt.cqt
xtt/lib/cow/qt/cow_wow_qt.cqt
+1
-1
xtt/lib/xtt/qt/xtt_multiview_qt.cpp
xtt/lib/xtt/qt/xtt_multiview_qt.cpp
+106
-280
xtt/lib/xtt/qt/xtt_multiview_qt.h
xtt/lib/xtt/qt/xtt_multiview_qt.h
+2
-6
xtt/lib/xtt/qt/xtt_stream_qt.cqt
xtt/lib/xtt/qt/xtt_stream_qt.cqt
+22
-15
xtt/lib/xtt/qt/xtt_stream_qt.h
xtt/lib/xtt/qt/xtt_stream_qt.h
+1
-0
No files found.
xtt/lib/cow/qt/cow_wow_qt.cqt
View file @
6e4e1530
...
@@ -561,7 +561,7 @@ void CoWowQt::PopupPosition(
...
@@ -561,7 +561,7 @@ void CoWowQt::PopupPosition(
QPoint p0((int)x_event, (int)y_event);
QPoint p0((int)x_event, (int)y_event);
grandparent = parent->parentWidget();
grandparent = parent->parentWidget();
while (!grandparent->isWindow()) {
while (
grandparent &&
!grandparent->isWindow()) {
if (parent->geometry().x() || parent->geometry().y()) {
if (parent->geometry().x() || parent->geometry().y()) {
p0 = parent->mapToParent(p0);
p0 = parent->mapToParent(p0);
}
}
...
...
xtt/lib/xtt/qt/xtt_multiview_qt.cpp
View file @
6e4e1530
This diff is collapsed.
Click to expand it.
xtt/lib/xtt/qt/xtt_multiview_qt.h
View file @
6e4e1530
...
@@ -57,8 +57,6 @@ public:
...
@@ -57,8 +57,6 @@ public:
QWidget
*
comp_widget
[
MV_SIZE
];
QWidget
*
comp_widget
[
MV_SIZE
];
QWidget
*
exchange_widget
[
MV_SIZE
];
QWidget
*
exchange_widget
[
MV_SIZE
];
QHBoxLayout
*
exchange_widget_layout
[
MV_SIZE
];
QHBoxLayout
*
exchange_widget_layout
[
MV_SIZE
];
QWidget
*
box_widget
;
QWidget
*
col_widget
;
XttGeQt
*
gectx
[
MV_SIZE
];
XttGeQt
*
gectx
[
MV_SIZE
];
XttMultiViewQt
*
mvctx
[
MV_SIZE
];
XttMultiViewQt
*
mvctx
[
MV_SIZE
];
EvAlaQt
*
sala
[
MV_SIZE
];
EvAlaQt
*
sala
[
MV_SIZE
];
...
@@ -95,15 +93,13 @@ private:
...
@@ -95,15 +93,13 @@ private:
XttMultiViewQtWidget
*
toplevel
;
XttMultiViewQtWidget
*
toplevel
;
};
};
class
XttMultiViewQtWidget
:
public
Q
Dialog
{
class
XttMultiViewQtWidget
:
public
Q
Widget
{
public:
public:
XttMultiViewQtWidget
(
XttMultiViewQt
*
parent_ctx
,
QWidget
*
parent
)
XttMultiViewQtWidget
(
XttMultiViewQt
*
parent_ctx
,
QWidget
*
parent
)
:
Q
Dialog
(
parent
),
multiview
(
parent_ctx
)
:
Q
Widget
(
parent
),
multiview
(
parent_ctx
)
{
{
}
}
void
resize
(
int
width
,
int
height
);
protected:
protected:
void
focusInEvent
(
QFocusEvent
*
event
);
void
focusInEvent
(
QFocusEvent
*
event
);
void
closeEvent
(
QCloseEvent
*
event
);
void
closeEvent
(
QCloseEvent
*
event
);
...
...
xtt/lib/xtt/qt/xtt_stream_qt.cqt
View file @
6e4e1530
...
@@ -203,6 +203,13 @@ void XttStreamQtWidget::resizeEvent(QResizeEvent* event)
...
@@ -203,6 +203,13 @@ void XttStreamQtWidget::resizeEvent(QResizeEvent* event)
}
}
}
}
void XttStreamQt::hidePtz()
{
if (ptz_box != NULL) {
ptz_box->setVisible(false);
}
}
void XttStreamQtWidget::mousePressEvent(QMouseEvent* event)
void XttStreamQtWidget::mousePressEvent(QMouseEvent* event)
{
{
switch (event->button()) {
switch (event->button()) {
...
@@ -215,7 +222,7 @@ void XttStreamQtWidget::mousePressEvent(QMouseEvent* event)
...
@@ -215,7 +222,7 @@ void XttStreamQtWidget::mousePressEvent(QMouseEvent* event)
int x = event->globalPos().x() + 8;
int x = event->globalPos().x() + 8;
int y = event->globalPos().y();
int y = event->globalPos().y();
stream->action_mb3click(x, y);
stream->action_mb3click(x, y);
stream->
ptz_box->setVisible(false
);
stream->
hidePtz(
);
break;
break;
}
}
default:
default:
...
@@ -259,7 +266,7 @@ void XttStreamQtWidget::mouseReleaseEvent(QMouseEvent* event)
...
@@ -259,7 +266,7 @@ void XttStreamQtWidget::mouseReleaseEvent(QMouseEvent* event)
&& ABS(event->pos().y() - stream->mb_press_y) < 10) {
&& ABS(event->pos().y() - stream->mb_press_y) < 10) {
stream->action_click(
stream->action_click(
event->pos().x() - offset_x, event->pos().y() - offset_y);
event->pos().x() - offset_x, event->pos().y() - offset_y);
stream->
ptz_box->setVisible(false
);
stream->
hidePtz(
);
} else if (ABS(event->pos().x() - stream->mb_press_x) > 20
} else if (ABS(event->pos().x() - stream->mb_press_x) > 20
&& abs(event->pos().y() - stream->mb_press_y) > 20) {
&& abs(event->pos().y() - stream->mb_press_y) > 20) {
int x = MIN(event->pos().x(), stream->mb_press_x) - offset_x;
int x = MIN(event->pos().x(), stream->mb_press_x) - offset_x;
...
@@ -268,7 +275,7 @@ void XttStreamQtWidget::mouseReleaseEvent(QMouseEvent* event)
...
@@ -268,7 +275,7 @@ void XttStreamQtWidget::mouseReleaseEvent(QMouseEvent* event)
int h = ABS(event->pos().y() - stream->mb_press_y);
int h = ABS(event->pos().y() - stream->mb_press_y);
printf("Mb zoom (%d,%d) rect %d,%d\n", x, y, w, h);
printf("Mb zoom (%d,%d) rect %d,%d\n", x, y, w, h);
stream->action_areaselect(x, y, w, h);
stream->action_areaselect(x, y, w, h);
stream->
ptz_box->setVisible(false
);
stream->
hidePtz(
);
}
}
break;
break;
}
}
...
@@ -318,12 +325,12 @@ void XttStreamQtWidget::wheelEvent(QWheelEvent* event)
...
@@ -318,12 +325,12 @@ void XttStreamQtWidget::wheelEvent(QWheelEvent* event)
void XttStreamQt::scroll_cb(void* data)
void XttStreamQt::scroll_cb(void* data)
{
{
XttStreamQt* strm = (XttStreamQt*)data;
XttStreamQt* str
ea
m = (XttStreamQt*)data;
strm->action_scroll(
str
ea
m->action_scroll(
str
m->scroll_direction, strm->scroll_x, strm->scroll_y, str
m->scroll_cnt);
str
eam->scroll_direction, stream->scroll_x, stream->scroll_y, strea
m->scroll_cnt);
strm->scroll_cnt = 0;
str
ea
m->scroll_cnt = 0;
str
m->ptz_box->setVisible(false
);
str
eam->hidePtz(
);
}
}
XttStreamQt::XttStreamQt(QWidget* st_parent_wid, void* st_parent_ctx,
XttStreamQt::XttStreamQt(QWidget* st_parent_wid, void* st_parent_ctx,
...
@@ -519,8 +526,8 @@ XttStreamQt::XttStreamQt(QWidget* st_parent_wid, void* st_parent_ctx,
...
@@ -519,8 +526,8 @@ XttStreamQt::XttStreamQt(QWidget* st_parent_wid, void* st_parent_ctx,
}
}
toplevel->setLayout(main_layout);
toplevel->setLayout(main_layout);
toplevel->setMinimumSize(width, height);
if (!embedded) {
if (!embedded) {
toplevel->setMinimumSize(width, height);
toplevel->show();
toplevel->show();
if (options & strm_mOptions_FullScreen) {
if (options & strm_mOptions_FullScreen) {
...
@@ -604,7 +611,7 @@ void XttStreamQtWidget::zoom_helper()
...
@@ -604,7 +611,7 @@ void XttStreamQtWidget::zoom_helper()
} else {
} else {
stream->camera_control->zoom_relative(value);
stream->camera_control->zoom_relative(value);
}
}
stream->
ptz_box->setVisible(false
);
stream->
hidePtz(
);
}
}
void XttStreamQtWidget::pan_helper()
void XttStreamQtWidget::pan_helper()
...
@@ -616,7 +623,7 @@ void XttStreamQtWidget::pan_helper()
...
@@ -616,7 +623,7 @@ void XttStreamQtWidget::pan_helper()
int value = ((QAction *) sender())->data().toInt();
int value = ((QAction *) sender())->data().toInt();
stream->camera_control->pan_relative(value);
stream->camera_control->pan_relative(value);
stream->
ptz_box->setVisible(false
);
stream->
hidePtz(
);
}
}
void XttStreamQtWidget::tilt_helper()
void XttStreamQtWidget::tilt_helper()
...
@@ -628,21 +635,21 @@ void XttStreamQtWidget::tilt_helper()
...
@@ -628,21 +635,21 @@ void XttStreamQtWidget::tilt_helper()
int value = ((QAction *) sender())->data().toInt();
int value = ((QAction *) sender())->data().toInt();
stream->camera_control->tilt_relative(value);
stream->camera_control->tilt_relative(value);
stream->
ptz_box->setVisible(false
);
stream->
hidePtz(
);
}
}
void XttStreamQtWidget::activate_preset_position()
void XttStreamQtWidget::activate_preset_position()
{
{
int idx = ((QAction*)sender())->data().toInt();
int idx = ((QAction*)sender())->data().toInt();
stream->activate_preset_position(idx);
stream->activate_preset_position(idx);
stream->
ptz_box->setVisible(false
);
stream->
hidePtz(
);
}
}
void XttStreamQtWidget::activate_preset_store_pos()
void XttStreamQtWidget::activate_preset_store_pos()
{
{
int idx = ((QAction*)sender())->data().toInt();
int idx = ((QAction*)sender())->data().toInt();
stream->activate_preset_store_pos(idx);
stream->activate_preset_store_pos(idx);
stream->
ptz_box->setVisible(false
);
stream->
hidePtz(
);
}
}
void XttStreamQtWidget::activate_get_position()
void XttStreamQtWidget::activate_get_position()
...
@@ -664,5 +671,5 @@ void XttStreamQtWidget::activate_get_position()
...
@@ -664,5 +671,5 @@ void XttStreamQtWidget::activate_get_position()
stream->ptz_pan->setText(pan_str);
stream->ptz_pan->setText(pan_str);
stream->ptz_tilt->setText(tilt_str);
stream->ptz_tilt->setText(tilt_str);
stream->ptz_zoom->setText(zoom_str);
stream->ptz_zoom->setText(zoom_str);
stream->
ptz_box->setVisible(false
);
stream->
hidePtz(
);
}
}
\ No newline at end of file
xtt/lib/xtt/qt/xtt_stream_qt.h
View file @
6e4e1530
...
@@ -79,6 +79,7 @@ public:
...
@@ -79,6 +79,7 @@ public:
void
pop
();
void
pop
();
void
set_size
(
int
width
,
int
height
);
void
set_size
(
int
width
,
int
height
);
void
hidePtz
();
void
*
get_widget
()
void
*
get_widget
()
{
{
...
...
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