11 #include <base/samples/Frame.hpp> 12 #include <base/samples/DistanceImage.hpp> 13 #include <frame_helper/FrameQImageConverter.h> 14 #include "rock_widget_collection/progress_indicator/ProgressIndicator.h" 50 Q_CLASSINFO(
"Author",
"Allan Conquest")
90 Q_PROPERTY(QString pipelineDescription READ getPipelineDescription WRITE setPipelineDescription)
98 Q_PROPERTY(
bool useGl READ getUseGl WRITE setUseGl)
137 const QString getPipelineDescription()
const;
138 void setPipelineDescription(QString descr);
140 void setUseGl(
bool use_gl);
154 void addCircle(QPointF ¢er,
double radius, QColor &color,
int width,
bool persistent = 0);
165 void addLine(QLineF &line, QColor &color,
int width,
bool persistent = 0);
176 void addPolygon(QPolygonF &polygon, QColor &color,
int width,
bool persistent = 0);
194 void addPoints(
const QList<int> points_x,QList<int> points_y, QColor &color,
int width,
bool persistent=0);
211 void addText(QString text,
int location, QColor color = QColor(Qt::black),
bool persistent = 0);
235 void saveImage(QString path = QString(),
bool overlay = 0);
244 void setFrame(
const base::samples::DistanceImage &frame);
245 void setFrame(
const base::samples::frame::Frame &frame);
247 void setRawImage(
const QString &mode,
int pixel_size,
int width,
int height,
const char* pbuffer,
const int size);
284 void displayContextMenu(QPoint screenPos);
285 void rotate_clockwise();
287 void save_image_overlay();
288 void startProgressIndicator();
291 void addDrawItem(QGraphicsScene *scene, QGraphicsItem *item,
bool persistent = 0);
292 void setItemPositions();
293 void setupContextMenu();
303 QString pipelineDescription;
307 QGraphicsView *imageView;
308 QGraphicsProxyWidget *imageViewProxy;
309 QGraphicsScene *imageScene;
310 QGraphicsView *fixedOverlayView;
311 QGraphicsScene *fixedOverlayScene;
312 QGraphicsWidget *overlayWidget;
313 QGraphicsGridLayout *overlay_grid;
314 QMap<int, QLabel*> overlayMap;
315 QGraphicsPixmapItem *imageItem;
318 QList<QGraphicsItem*> persistentDrawItems;
319 QList<QGraphicsItem*> volatileDrawItems;
323 frame_helper::FrameQImageConverter frame_converter;
326 QTimer progress_indicator_timer;
330 QAction rotate_image_clockwise_act;
331 QAction save_image_act;
332 QAction save_image_overlay_act;
333 QAction activate_progress_indicator_act;
334 QAction rgb_swapped_act;
335 QAction invert_color_act;
void setRawImage(const QString &mode, int pixel_size, int width, int height, const char *pbuffer, const int size)
void addText(QString text, int location, QColor color=QColor(Qt::black), bool persistent=0)
Draws text overlay.
void saveImage(QString path=QString(), bool overlay=0)
Saves current image to file.
void setRgbSwapped(bool swapped)
void addPoints(const QList< int > points_x, QList< int > points_y, QColor &color, int width, bool persistent=0)
Draws points overlay (2D point cloud).
void setUseProgressIndicator(bool use)
void setImage(const QImage &image)
void addCircle(QPointF ¢er, double radius, QColor &color, int width, bool persistent=0)
Draws circle overlay.
bool useProgressIndicator()
int getHeight() const
returns the real height of the underlaying widget
ImageView(QWidget *parent=0)
const QColor & getBackgroundColor() const
QColor backgroundColor
The widget's background color.
const int getProgressIndicatorTimeout() const
void setBackgroundColor(const QColor &color)
void addPolygon(QPolygonF &polygon, QColor &color, int width, bool persistent=0)
Draws polygon overlay.
bool useSmoothTransformation()
void clickedImage(const QPoint &point)
Mouse click coordinates in image.
bool eventFilter(QObject *obj, QEvent *event)
int getWidth() const
returns the real width of the underlaying widget
The ProgressIndicator class lets an application display a progress indicator to show that a lengthy t...
bool use_progress_indicator
Display progress indicator widget if no frames have being received for a defined time.
void setInvertColor(bool invert)
void setFrame(const base::samples::DistanceImage &frame)
Frame input.
void setSmoothTransformation(bool smooth)
TextLocation
Text overlay alignment specification.
void update2()
Wrapper for QWidget::update(). This is due to some QtRuby limitations.
bool use_smooth_transformation
Usage of antialiasing techniques during image transformation.
Image viewer with optional text and geometry overlay functionality.
void setProgressIndicatorTimeout(int timeout)
void contextMenuEvent(QContextMenuEvent *event)
void rotate(int deg)
Rotates image display.
void clearOverlays(bool clear_persistent_items=0)
Removes overlays.
void resizeEvent(QResizeEvent *event)
void addLine(QLineF &line, QColor &color, int width, bool persistent=0)
Draws line overlay.
int progress_indicator_timeout
The time without frame update in ms after which the progress indicator gets started.