SelectableImageViewer.h
Go to the documentation of this file.
1
/*
2
* This file is part of ArmarX.
3
*
4
* ArmarX is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation.
7
*
8
* ArmarX is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* @package VisionX::ArmarXObjects::SelectableImageViewer
17
* @author Rainer Kartmann ( rainer dot kartmann at student dot kit dot edu )
18
* @date 2018
19
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20
* GNU General Public License
21
*/
22
23
#pragma once
24
25
#include <
VisionX/gui-plugins/ImageMonitor/ImageViewerArea.h
>
26
27
#include <QWidget>
28
#include <QMouseEvent>
29
30
namespace
armarx
31
{
32
/**
33
* @defgroup Library-SelectableImageViewer SelectableImageViewer
34
* @ingroup VisionX-Components
35
* Offers the SelectableImageViewer widget.
36
*
37
* @class SelectableImageViewer
38
* @ingroup VisionX-Libraries
39
* @brief A clickable, i.e. selectable, visionx::ImageViewerArea.
40
*
41
* The SelectableImageViewer is a visionx::ImageViewerArea which can be clicked
42
* on to make a selection in the displayed image
43
*/
44
class
SelectableImageViewer
:
public
visionx::ImageViewerArea
45
{
46
Q_OBJECT
47
public
:
48
explicit
SelectableImageViewer
(QWidget* parent = 0);
49
50
void
mousePressEvent
(QMouseEvent* ev)
override
;
51
52
signals:
53
54
/**
55
* @brief Signals that a pixel was selected in the image viewer.
56
*/
57
void
selected
();
58
59
/**
60
* @brief Signals that a pixel was selected in the image viewer.
61
* @param imageIndex the index of the selected image, in [0 .. numImages-1]
62
* @param x the relative x coordinate, in [0 .. 1)
63
* @param y the relative y coordinate, in [0 .. 1)
64
*/
65
void
selected
(
int
imageIndex,
float
x,
float
y);
66
67
public
slots:
68
69
70
71
72
};
73
74
}
armarx::SelectableImageViewer::selected
void selected()
Signals that a pixel was selected in the image viewer.
visionx::ImageViewerArea
Definition:
ImageViewerArea.h:38
armarx::SelectableImageViewer::SelectableImageViewer
SelectableImageViewer(QWidget *parent=0)
Definition:
SelectableImageViewer.cpp:28
ImageViewerArea.h
armarx::SelectableImageViewer
A clickable, i.e. selectable, visionx::ImageViewerArea.
Definition:
SelectableImageViewer.h:44
armarx::SelectableImageViewer::mousePressEvent
void mousePressEvent(QMouseEvent *ev) override
Definition:
SelectableImageViewer.cpp:33
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:28
VisionX
libraries
SelectableImageViewer
SelectableImageViewer.h
Generated on Sat Oct 12 2024 09:14:18 for armarx_documentation by
1.8.17